我的react应用程序在端口3000上运行,而我的express服务器在端口5000上运行。我还使用passport对用户进行身份验证。Origin 'http://localhost:3000' is therefore not allowed access.else { });//enables cors
路由器不工作。localhost:3000/,localhost:3000/#/,localhost:3000/#/aa ==> all moves in home page。index.js import ReactDOM from 'react-dom'
import { BrowserRouter, Route, Switch } from 'react