printServer/index.js
2026-03-29 13:26:23 +08:00

10 lines
294 B
JavaScript

import http from 'http';
import configUtil from './utils/config.js';
import app from './core/main.js'
const server = http.createServer((req, res) => {
app.router(req, res);
});
server.listen(app.config.port, () => {
console.log(`服务器已启动,监听端口: ${app.config.port}`);
});