javascript - react uses ant Design. How to put packaged static files on express
为情所困
为情所困 2017-05-19 10:43:27
0
3
555

I used ant design to create a single-page application that uses a lot of routing functions. How should I deploy it to express

为情所困
为情所困

reply all(3)
世界只因有你

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template