10 lines
294 B
JavaScript
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}`);
|
|
}); |