I used ant design to create a single-page application that uses a lot of routing functions. How should I deploy it to express
世界只因有你2017-05-19 10:45:27
Express’ built-in express.static can easily host static files, such as images, CSS, JavaScript files, etc. The specific method is to add an express middleware.
app.use(express.static(path.join(__dirname, "你的打包后react项目路径")))
大家讲道理2017-05-19 10:45:27
Did you use Universal rendering? After accessing the listening port, wouldn’t it be enough to directly send the entry file?
怪我咯2017-05-19 10:45:27
I know, it turns out that I used browserHistory and I couldn’t do anything. If I used browserHistory or hashHistory