Skip to main content

How to run a local webserver to serve static files

· One min read
CTO

To run a simple static HTTP server, use http-server.

To install, run..

npm install --global http-server

For development, I don't want caching on by default, so I run http-server with the following flag..

http-server -c-1

For details of usage, read this.