wsrv
v0.2.2
Published
micro web server
Downloads
15
Maintainers
Readme
wsrv: micro web server
Features:
- Dynamic port allocation on startup
- SPA (Single Page Application) support
- Live reload and file watchers
- Open browser upon startup
- Directory listing, automatic index
- Custom port and host settings
- Custom server extensions
Documentation
Installing
As a global tool
npm install -g wsrv
Now you can serve any directory like following:
cd my-proj
wsrv -o
As a project dependency
npm install --save-dev wsrv
Usage
./wsrv [path] [options]
Example
Serve the content of the www
subdirectory with SPA support and open browser
instance at the root:
wsrv -p 3000 -s -o
or
./node_modules/.bin/wsrv ./www -p 3000 -s -o
More details
You can get more details and examples in the official documentation.