You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constexpress=require('express');constapp=express();constpath=require('path');// 使用path.join获取绝对路径constbuildPath=path.join(__dirname,'dist');app.use(express.static(path.join(__dirname,'dist')));app.get('/*',function(req,res){res.sendFile(path.join(__dirname,'dist','index.html'));});constport=process.env.PORT||3000;app.listen(port,()=>{console.log(`Server started on http://localhost:${port}`);});
🧐 问题描述 | Problem description
项目build部署后,无法登录。本地使用
yarn start
或者npm run start
能正常登录。部署后无法登录, Response status:404 。浏览器响应状态:
版本:
[email protected]
💻 部署代码
node run_server.js
💻 proxy.ts
💻 config.ts
🚑 报错截图
The text was updated successfully, but these errors were encountered: