Reputation: 2634
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 (e.g.: 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?
Upvotes: 2
Views: 1522
Reputation: 2206
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
Upvotes: 0
Reputation: 2814
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.
Upvotes: 1