app.js

const http = require('http')
const https = require('https')
const Koa = require('koa')

const app = new Koa()

app.use(ctx => {
  ctx.body = 'Hello, World!'
})

app.listen(3000)
// http.createServer(app.callback()).listen(3000)
// https.createServer(app.callback()).listen(3000)

相关文章:

  • 2021-12-08
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2021-06-24
  • 2021-12-12
猜你喜欢
  • 2022-12-23
  • 2021-08-29
  • 2021-07-28
  • 2021-11-15
  • 2021-12-02
  • 2021-05-22
相关资源
相似解决方案