Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Serve assets from `public/` instead of `.`

See original GitHub issue

By 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:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

gaearoncommented, Aug 28, 2016

@davidascher I think that use case will be addressed by #226 and #413.

gaearoncommented, Sep 22, 2016

That’s the approach I’m going to take in 0.5.0.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found