I can't find anywhere an answer for this: do I need to restart the simple http-server
if I edit client files like .html , .css or .js (eg: index.html ) from the directory the server is based on?
I want to use http-server
for development phase, when I edit various files multiple times.
Note: this question is not related to How can I edit on my server files without restarting nodejs when i want to see the changes?
No. The simple http-server
should recognize any changes you make to static files like html
, css
, and js
. The simplest thing to do is give it a try.
The http-server
uses ecstatic to serve static content. This library returns a Cache-Control
header where default timeout is 3600 seconds (1 hour). You can change the timeout by specifying cache
(in seconds) in the options you pass to http-server
- which in turn will be passed on to ecstatic
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.