0.3.3 • Published 7 years ago

sencisho v0.3.3

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

sencisho

Description

A simple http server for local development, built on top of Node.js

Usage

npm install -g sencisho

From the directory you want to serve static files:

sencisho [options]

Options

--port -p Port number

--live -l Enable livereload

--browser -b Specify browser

--watch -w Additional paths to watch

--silent -s Don't automatically open a browser

--responses -r Specify a json file containing a response map

when using the -r/--responses option, livereload will be enabled

Examples

Start in default port

sencisho

Start in specified port

sencisho --port 8888 or sencisho -p 8888

Enable livereload

sencisho --live or sencisho -l

Open in other browser than your system default

sencisho --browser opera or sencisho -b opera

Add additional paths to the file watcher

sencisho --watch js/*.js or sencisho -w js/*.js

Don't automatically open a browser

sencisho --silent or sencisho -s

Specify a json file containing a response map

sencisho --responses api.json or sencisho -r api.json

Example:

{
  "/api/test": {

    "headers": {
      "Content-type": "application/json",
      "Access-Control-Allow-Origin": "*",
      "Access-Control-Allow-Headers": "X-Requested-With"
    },

    "statusCode": 200,

    "body": {
      "name": "Something",
      "data": [1, 2, 3, 4, 5]
    }
  }
}

The only required property is the body but you can specify headers and a statusCode

All at once (may be passed in any order)

sencisho -p 8888 -l -b opera -w js/*.js -s -r api.json

Misc

  • What's up with that name?

    It's a long story

Authors/Contributors

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

10 years ago

0.2.3

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.9

10 years ago

0.1.8

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago