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`);
});