Serve assets from `public/` instead of `.`
See original GitHub issueBy serving assets from the root directory you cannot have routes that have names the same as the folders built in such as src
or any other you add to the app.
If we put index.html
and all other static assets within a public
folder this would only expose the assets that are needed.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Basic Features: Static File Serving - Next.js
js can serve static files, like images, under a folder called public in the root directory. Files inside public can then be referenced...
Read more >Serving static files in Express
To serve static files such as images, CSS files, and JavaScript files, use the express.static built-in middleware function in Express.
Read more >ruby on rails - How can I serve assets in /public that are not ...
My compiled assets (in /public/assets) are served as expected. The other assets in /public are not being served (404).
Read more >Serving Static Resources in Node.js - TutorialsTeacher
In this section, you will learn how to serve static resources like images, css, JavaScript or other static files using Express.js and node-static...
Read more >Serve static assets express - The freeCodeCamp Forum
Or you could change the style sheet link to style.css instead of /public/style.css , which is what I did while debugging.
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
@davidascher I think that use case will be addressed by #226 and #413.
That’s the approach I’m going to take in 0.5.0.