Specify how to use inside server.js script

This commit is contained in:
Zalmoxisus 2016-05-29 14:50:27 +03:00
parent 75b24b0fe3
commit 575ae55189

View File

@ -11,7 +11,7 @@ npm install --save-dev remotedev-server
### Usage ### Usage
Add in your app's `package.json`: ##### Add in your app's `package.json`:
``` ```
"scripts": { "scripts": {
@ -21,7 +21,16 @@ Add in your app's `package.json`:
So, you can start local server by running `npm run remotedev`. So, you can start local server by running `npm run remotedev`.
If you install the package globally (not recommended) just run: ##### Import in your `server.js` script you use for starting a development server:
```js
var remotedev = require('remotedev-server');
remotedev({ hostname: 'localhost', port: 8000 });
```
So, you can start remotedev server together with your dev server.
##### Install the package globally (not recommended) just run:
``` ```
remotedev --hostname=localhost --port=8000 remotedev --hostname=localhost --port=8000