Initial commit: 12个专业个人简历作品集项目
This commit is contained in:
19
个人简历_大健康/server.js
Normal file
19
个人简历_大健康/server.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const express = require('express');
|
||||
const path = require('path');
|
||||
|
||||
const app = express();
|
||||
const PORT = 4004;
|
||||
|
||||
// 设置静态文件目录
|
||||
app.use(express.static('.'));
|
||||
|
||||
// 主路由
|
||||
app.get('/', (req, res) => {
|
||||
res.sendFile(path.join(__dirname, 'index.html'));
|
||||
});
|
||||
|
||||
// 启动服务器
|
||||
app.listen(PORT, '127.0.0.1', () => {
|
||||
console.log(`财经商贸项目服务器运行在 http://127.0.0.1:${PORT}/`);
|
||||
console.log('按 Ctrl+C 停止服务器');
|
||||
});
|
||||
Reference in New Issue
Block a user