From aa93a539163333dd080f049069580a01ca848ce0 Mon Sep 17 00:00:00 2001 From: Lloyd Brookes Date: Tue, 17 Jun 2014 13:37:51 +0100 Subject: [PATCH] readme --- README.md | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5b6df04..9e5d538 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,37 @@ Fires up a simple, static web server on a given port. Use for local web developm Install ------- -Install [Node.js](http://nodejs.org), then run +Ensure [node.js](http://nodejs.org) is installed first. Linux/Mac users may need to run the following commands with `sudo`. +##As a global command ```sh $ npm install -g local-web-server ``` -*Linux/Mac users may need to run the above with `sudo`* +##As a server deployed with your project +```sh +$ npm install local-web-server --save-dev +``` + +Then add an `npm start` script to your `package.json`, the standard npm approach: +```json + "scripts": { + "start": "ws" + } +``` +This simplifies a set of rather specific looking install instructions like: + +```sh +$ npm install +$ npm install -g local-web-server +$ ws +``` + +to the following, server implementation and launch details abstracted away: +```sh +$ npm install +$ npm start +``` Usage ----- @@ -120,8 +144,16 @@ To view your stored defaults, run: $ ws --config ``` -Use with Logstalgia -------------------- +##Deploy the web server with your project +It's quite common to see a set of installation instructions like this: + +```sh +$ npm install +$ npm install -g +``` + + +##Use with Logstalgia local-web-server is compatible with [logstalgia](http://code.google.com/p/logstalgia/). ###Install Logstalgia