GitHub | npm | donate | @craigbuckler | craigbuckler.com
A small and fast cross-platform Node.js static file server with no dependencies. The directory default is index.html
and correct MIME types are used.
Ideal for serving client-side code on a development machine, but not optimised for production servers (no compression, caching, security, etc.)
Install globally:
npm i small-static-server -g
Launch using ss
or smallserver
to serve files from the current root directory, e.g. http://localhost:8888/
To quit, press Ctrl|Cmd + C
.
smallserver [port] [dir]
where:
[port]
is an optional HTTP port (8888 by default)[dir]
is an optional absolute or relative root file directory (the current directory by default)
- directory file list and navigation
- proxy to other servers
- MIME support for .mjs and .cjs
- disabled caching on all files
- MIME support for manifest
- MIME support for XHTML files
- initial release