所以我试图将我的React App连接到快速路由-到目前为止,对于我的服务器,我有
const express = require('express');
const app = express();
const port = 5000;
app.use('/test', require('./client/src/App'));
app.listen(port, () => console.log(`Server started on port ${port}`));
我希望能够转到localhost:5000 / test并显示我的create-react-app(./client/src/App)。
我的服务器在5000上运行,而React在3000上运行。
我意识到React有自己的路由,但是我想知道是否可以通过这种方式。