1.0.0 • Published 7 years ago

rigor v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

rigor

A simple static server built with express and commander

Installation

Global

npm install -g rigor

Local

npm install --save rigor

Usage

Global

rigor ./my-directory

Local

Locally you need to use npm run to use the local version in the PATH. So you can just add a script to your npm package to run rigor. e.g.:

package.json

...
"scripts": {
  "serve": "rigor ./my-directory",
},
...

Process Managers

Chances are you may want to run the server as a process with something like pm2 or forever. To do this, you will need to set up a script to run rigor. e.g.:

start.sh

./node_modules/.bin/rigor ./my-directory

You'll notice that we've specified the relative path to rigor. This is only necessary if rigor is not global.

It also doesn't need to be a shell script, just make sure to set the relevant configuration on the process manager for whatever type of script you use.

Options

-s, --single

Flags the server as a single page application and will direct all asset requests to the index file.

-p, --port

Specify the port to use. Defaults to 8888

-i, --index

Specify the name of the index file. Defaults to index.html

1.0.0

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago