Alibaba cloud Q & A 2022-02-13 07:34:17 阅读数:793
Vue + Express project Deployed to Linux Static resources cannot be accessed after the server . vue.config.js Set up ：
The absolute path is set at the beginning , no way , After changing to a relative path, it still doesn't work .
Node Express ：
Report errors ：
When accessing the server, you can get the information of the page title , But you can't get static resources .
There is no problem when running locally , But deploy to Linux That's it on the server
app.use('/css', express.static(assets +'/css'));app.use('/js', express.static(assets +'/js'));
copyright：author[Alibaba cloud Q & A]，Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130734154446.html