Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

wsrv

DenysVuika64MIT0.2.2

micro web server

development, server, spa, static, web, http

readme

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.

changelog

0.2.1

  • migrate to GitLab
  • rename docs folder to public
  • GitLab CI settings

0.2.0

  • proxy support
  • bug fixes for configuration file handling
  • new documentation

0.1.7

  • pdated external dependencies to the most recent stable versions
  • pinned library versions
  • yarn.lock file

0.1.5

  • support for custom start page to open browser with

0.1.4

  • support for external extensions

0.1.3

  • minor improvements

0.1.2

  • minor improvements

0.1.1

  • minor improvements

0.1.0

  • Initial implementation