server-watch

1.0.8 • Public • Published

Server Watch

A feather-light package that watches and actively reloads node js server instances


Installation

To install this package run:

npm install -g server-watch

To install this package on a per-project basis run:

npm install server-watch

How to use

There are two ways to run server-watch

CLI run with arguments

If you installed the package globally, just run:

server-watch index.js

If you installed the package for just a specific project, then you need to append the npx command to it. Like this:

npx server-watch index.js

Setting up an sw.config.json file

If you add an sw.config.json to your root directory, you only need to run:

server-watch

Your configuration in your config file sets the required options for watching the server.

Basic configuration

{
    "exec": "node .",
    "ignore": [".git", "node_modules"]
}
Parameters:

required: exec - This is your exectuion script

optional: ignore - This is an array of paths to ignore when waching the server

Package Sidebar

Install

npm i server-watch

Weekly Downloads

2

Version

1.0.8

License

MIT

Unpacked Size

4.18 kB

Total Files

3

Last publish

Collaborators

  • tben