index.js 316 B

123456789101112
  1. const express = require('express')
  2. const path = require('path')
  3. const app = express()
  4. app.use(express.static(path.join(__dirname, './client')))
  5. const server = app.listen(25565, function () {
  6. const host = server.address().address
  7. const port = server.address().port
  8. console.log('服务启动', host, port)
  9. })