jifuyun-order-v1/chat-server/server.js

14 lines
333 B
JavaScript
Raw Normal View History

const AppServer = require('./app')
const dotenv = require('dotenv')
// 加载环境变量
dotenv.config()
// 创建服务器实例
const server = new AppServer()
// 获取端口配置默认为3100避免与前端开发服务器冲突
const port = process.env.CHAT_SERVER_PORT || 3100
// 启动服务器
server.start(port)