static file like .css and .js not load error 404
See original GitHub issueexpress js version : “express”: “^4.18.2”,
app.use(Express.static('public'));
express folder with app.js server code same dir i have public folder.
public/
- app.js
- app.css
when i try to access https://mystoreapp.io/app.js https://mystoreapp.io/app.css
getting Error 404
HTTP ERROR 404 ```
Issue Analytics
- State:
- Created 10 months ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Error 404 when loading css in static folder - Stack Overflow
I have created CSS files in a folder static and currently I'm getting this error 404 when its trying to load the page...
Read more >Staticfiles error 404 in Django | unable to load CSS or JS
Django unable to load static files like css, javascript, images or etc. In this type of situation, Django occurs 404 error.
Read more >Broken pages after some time (css and js error 404)
After the FVM plugin update we are getting broken pages. After some time CSS and JS files display 404 error on the first...
Read more >Css and Js files are giving 404 error - django-handling-static ...
The static files of the admin is getting collected but the other static files like materilize.css and materlize.js is not there in the...
Read more >CSS Styles and javascript missing from site when not logged ...
If you use your browser's web inspector, you'll find javascript and CSS files result in a 404 missing error. Safari says can't open...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try to remove the part of code where you set the content-security-policy header, and check if it loads. I had same issues when I used helmet package running server on bare http.
git repo that code was same for the server i added the code into my local repo.
Public folder create in same directory on index.js in server folder.