普普通通的入口

    1. const express = require('express')
    2. const http = require('http')
    3. const path = require('path')
    4. const app = express()
    5. const server = http.createServer(app)
    6. // 静态资源访问
    7. app.use(express.static(path.resolve(__dirname, './public')));
    8. require('./chatServer')(server)
    9. server.listen(5000, () => {
    10. console.log(`Example app listening at http://localhost:5000`);
    11. })