staticserver
Localhost server for HTML, JS and CSS development with SSL.
Usage
- Download one of the files that match your OS.
- Rename executable and put into
PATH
:
- for Mac and Linux rename to
staticserver
- for Windows rename to
staticserver.exe
- Navigate inside a folder with static files and run:
staticserver
: activate a prompt with different options.staticserver -default
: skip the prompt and set all flags to false.staticserver -ssl -gzip -cache
: set the three flags to true
Example:
Localhost flags
ssl
: activate an HTTPS servergzip
: activate gzip –Content-Encoding: gzip
cache
: activate cache –Cache-Control: public, max-age=7776000
default
: use this flag to start the server with all flags set to false
The flags
ssl, gzip, cache
helps in obtaining 100% score in Google Lighthouse.