You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
371 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

const app = require('./app');
require('dotenv').config();
// 从.env读取端口若没配置则用3000默认值
const PORT = process.env.PORT || 3000;
// 启动服务,监听指定端口
app.listen(PORT, () => {
console.log(`后端服务已启动地址http://localhost:${PORT}`);
console.log(`登录接口地址http://localhost:${PORT}/api/login`);
});