Files
hometown/server/index.js
2026-03-07 19:37:38 +08:00

11 lines
336 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env node
/**
* 单独启动后端 API仅 API 路由,不提供静态资源)。
* 用于前后端分离部署时,将本目录部署到 Node 主机。
*/
const app = require('./server.js');
const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
console.log('API 已启动: http://localhost:' + PORT);
});