I used ant design to create a single-page application that uses a lot of routing functions. How should I deploy it to express
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项目路径")))
Did you use Universal rendering? After accessing the listening port, wouldn’t it be enough to directly send the entry file?
I know, it turns out that I used browserHistory and I couldn’t do anything. If I used browserHistory or hashHistory
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.
Did you use Universal rendering? After accessing the listening port, wouldn’t it be enough to directly send the entry file?
I know, it turns out that I used browserHistory and I couldn’t do anything. If I used browserHistory or hashHistory