[RFC] Serving static files from the root
See original GitHub issueFeature request
Is your feature request related to a problem? Please describe.
After seeing some custom server.js usage a clear pattern is people using it to define static file serving from the root. For example for robots.txt or google site verification and other files that have to be served from the root.
Describe the solution you’d like
Ideally users would not have to define this. The common way root serving has been solved is through a public directory.
For example:
Notes
This also needs to be applied to @now/next when implemented.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:54
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Python Flask serving static files from root static folder rather ...
Hey, thank you for responding. I tried removing the static_folder and static_url_path variables, but it is still making the request to "GET / ......
Read more >Serving static files in Express
To serve static files such as images, CSS files, and JavaScript files, ... The root argument specifies the root directory from which to...
Read more >RFC 8806: Running a Root Server Local to a Resolver
This design explicitly only allows the new root zone service to be run on the same server as the recursive resolver in order...
Read more >Serve static files with HTTP::Server::Simple - manpages.ubuntu!
serve_static( $cgi, $base ) Takes a reference to the CGI object and a document root path, and tries to serve a static file....
Read more >Mojolicious::Static - Serve static files
Mojolicious::Static is a static file server with Range , If-Modified-Since and If-None-Match support, based on RFC 7232 and RFC 7233.
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 Free
Top 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

I think
public/is more explicit. In fact I already have apublic/folder that I copy manually to out during the export:One implementation detail that we have to figure out is which are preferred: pages or public directory. I think it should be pages first.