0.2.2 • Published 8 years ago
wsrv v0.2.2
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 wsrvNow you can serve any directory like following:
cd my-proj
wsrv -oAs a project dependency
npm install --save-dev wsrvUsage
./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 -oor
./node_modules/.bin/wsrv ./www -p 3000 -s -oMore details
You can get more details and examples in the official documentation.