wsrv

0.2.2 • Public • Published

wsrv: micro web server

npm pipeline status codecov

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.

Dependents (1)

Package Sidebar

Install

npm i wsrv

Weekly Downloads

11

Version

0.2.2

License

MIT

Last publish

Collaborators

  • denysvuika