{"name":"remotedev-server","version":"0.3.0-beta-4","description":"Run the RemoteDev monitor on your local server.","main":"index.js","bin":{"remotedev":"bin/remotedev.js"},"files":["bin","lib","views","index.js","defaultDbOptions.json"],"scripts":{"test":"NODE_ENV=test mocha --recursive","test:watch":"NODE_ENV=test mocha --recursive --watch","prepublish":"npm run test"},"repository":{"type":"git","url":"git+https://github.com/zalmoxisus/remotedev-server.git"},"keywords":["devtools","remotedev"],"engines":{"node":">=4.0.0"},"author":{"name":"Mihail Diordiev","email":"zalmoxisus@gmail.com","url":"https://github.com/zalmoxisus"},"license":"MIT","bugs":{"url":"https://github.com/zalmoxisus/remotedev-server/issues"},"homepage":"https://github.com/zalmoxisus/remotedev-server","dependencies":{"apollo-server":"^0.3.3","body-parser":"^1.15.0","chalk":"^1.1.3","cors":"^2.7.1","ejs":"^2.4.1","express":"^4.13.3","getport":"^0.1.0","graphql":"^0.8.0","graphql-tools":"^0.8.1","js-data":"^2.9.0","knex":"0.11.10","lodash":"^4.15.0","minimist":"^1.2.0","morgan":"^1.7.0","node-uuid":"^1.4.0","semver":"^5.3.0","socketcluster":"^5.0.4","sqlite3":"^3.1.8"},"devDependencies":{"expect":"^1.20.2","mocha":"^3.2.0","socketcluster-client":"^5.1.1","supertest":"^2.0.1"},"gitHead":"a0bbc23ef1e806f4bfbb41a721b0a76721f32e02","_id":"remotedev-server@0.3.0-beta-4","_shasum":"4497ad8673cee081a366964d97e9c8a46f0b2ee9","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"zalmoxisus","email":"zalmoxisus@gmail.com"},"dist":{"shasum":"4497ad8673cee081a366964d97e9c8a46f0b2ee9","tarball":"http://registry-npm.ywwl.com/remotedev-server/download/remotedev-server-0.3.0-beta-4.tgz","integrity":"sha512-3uOqJWrnbNB6cHHNYw8WsFNIxJKZ4ddlgPkqWfT9nmGqcl6fx/KPkbmcIvdFaOz+gIh7jmHJP9dIqJb9x/iA9Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDT/b4ZRhKWvquk+boaXgp8PyWCTNLYblTqwAdUaHmwsgIhAK+KckEngnW792RXH3U+p8WTTciBeCl2cMsNmX0iyZ/P"}],"size":9794,"noattachment":false,"key":"/remotedev-server/-/remotedev-server-0.3.0-beta-4.tgz"},"maintainers":[{"name":"zalmoxisus","email":"zalmoxisus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/remotedev-server-0.3.0-beta-4.tgz_1492179462455_0.4927986452821642"},"directories":{},"readme":"RemoteDev Server\n================\n\nBridge for communicating with an application remotely via [Redux DevTools extension](https://github.com/zalmoxisus/redux-devtools-extension), [Remote Redux DevTools](https://github.com/zalmoxisus/remote-redux-devtools) or [RemoteDev](https://github.com/zalmoxisus/remotedev). Running your server is optional, you can use [remotedev.io](https://remotedev.io) instead.\n\n### Installation\n\n```\nnpm install --save-dev remotedev-server\n```\n\nAlso [there's a docker image](https://github.com/jhen0409/docker-remotedev-server) you can use.\n\n### Usage\n\n##### Add in your app's `package.json`:\n\n```\n\"scripts\": {\n  \"remotedev\": \"remotedev --hostname=localhost --port=8000\"\n}\n```\n\nSo, you can start remotedev server by running `npm run remotedev`.\n\n##### Import in your `server.js` script you use for starting a development server:\n\n```js\nvar remotedev = require('remotedev-server');\nremotedev({ hostname: 'localhost', port: 8000 });\n```\n\nSo, you can start remotedev server together with your dev server.\n\n##### Install the package globally (not recommended) just run:\n\n```\nremotedev --hostname=localhost --port=8000\n```\n\n### Connection settings\n\nSet `hostname` and `port` to the values you want. `hostname` by default is `localhost` and `port` is `8000`.\n\nTo use WSS, set `protocol` argument to `https` and provide `key`, `cert` and `passphrase` arguments.\n\n\n#### Available options\n\n| Console argument | description                                                                                                                                             | default value |\n| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |\n| `--hostname`     | hostname                                                                                                                                                | localhost     |\n| `--port`         | port                                                                                                                                                    | 8000          |\n| `--protocol`     | protocol                                                                                                                                                | http          |\n| `--key`          | the key file for [running an https server](https://github.com/SocketCluster/socketcluster#using-over-https) (`--protocol` must be set to 'https')       | -             |\n| `--cert`         | the cert file for [running an https server](https://github.com/SocketCluster/socketcluster#using-over-https) (`--protocol` must be set to 'https')      | -             |\n| `--passphrase`   | the key passphrase for [running an https server](https://github.com/SocketCluster/socketcluster#using-over-https) (`--protocol` must be set to 'https') | -             |\n| `--dbOptions`    | database configuration, can be whether an object or a path (string) to json configuration file (by default it uses our `./defaultDbOptions.json` file. Set `migrate` key to `true` to use our migrations file. [More details bellow](https://github.com/zalmoxisus/remotedev-server#save-reports-and-logs).                                   | -             |\n| `--logLevel`     | the socket server log level - 0=none, 1=error, 2=warn, 3=info                                                                                           | 3             |\n| `--wsEngine`     | the socket server web socket engine - ws or uws (sc-uws)                                                                                                    | ws            |\n\n### Inject to React Native local server\n\n##### Add in your React Native app's `package.json`:\n\n```\n\"scripts\": {\n  \"remotedev\": \"remotedev --hostname=localhost --port=8000 --injectserver=reactnative\"\n}\n```\n\nThe `injectserver` value can be `reactnative` or `macos` ([react-native-macos](https://github.com/ptmt/react-native-macos)), it used `reactnative` by default.\n\nThen, we can start React Native server and RemoteDev server with one command (`npm start`).\n\n##### Revert the injection\n\nAdd in your React Native app's `package.json`:\n\n```\n\"scripts\": {\n  \"remotedev-revert\": \"remotedev --revert=reactnative\"\n}\n```\n\nOr just run `$(npm bin)/remotedev --revert`.\n\n### Connect from Android device or emulator\n\n> Note that if you're using `injectserver` argument explained above, this step is not necessary. \n\nIf you're running an Android 5.0+ device connected via USB or an Android emulator, use [adb command line tool](http://developer.android.com/tools/help/adb.html) to setup port forwarding from the device to your computer:\n\n```\nadb reverse tcp:8000 tcp:8000\n```\n\nIf you're still use Android 4.0, you should use `10.0.2.2` (Genymotion: `10.0.3.2`) instead of `localhost` in [remote-redux-devtools](https://github.com/zalmoxisus/remote-redux-devtools#storeconfigurestorejs) or [remotedev](https://github.com/zalmoxisus/remotedev#usage).\n\n### Save reports and logs\n\nYou can store reports via [`redux-remotedev`](https://github.com/zalmoxisus/redux-remotedev) and get them replicated with [Redux DevTools extension](https://github.com/zalmoxisus/redux-devtools-extension) or [Remote Redux DevTools](https://github.com/zalmoxisus/remote-redux-devtools). You can get action history right in the extension just by clicking the link from a report. Open `http://localhost:8000/graphiql` (assuming you're using `localhost` as host and `8000`) to explore in GraphQL. Reports are posted to `http://localhost:8000/`. See examples in [tests](https://github.com/zalmoxisus/remotedev-server/blob/937cfa1f0ac9dc12ebf7068eeaa8b03022ec33bc/test/integration.spec.js#L110-L165).\n\nRemotedev server is database agnostic using `knex` schema. By default everything is stored in the memory using sqlite database. See [`defaultDbOptions.json`](https://github.com/zalmoxisus/remotedev-server/blob/master/defaultDbOptions.json) for example of sqlite. You can replace `\"connection\": { \"filename\": \":memory:\" },` with your file name (instead of `:memory:`) to persist teh database. Here's an example for PostgreSQL:\n```\n{\n  \"client\": \"pg\",\n  \"connection\": { \"user\": \"myuser\", \"password\": \"mypassword\", \"database\": \"mydb\" },\n  \"debug\": false,\n  \"migrate\": true\n}\n```\n\n### Advanced\n- [Writing your integration for a native application](https://github.com/zalmoxisus/remotedev-server/blob/master/docs/API/Realtime.md)\n\n### License \n\nMIT\n","publish_time":1492179463312,"_cnpm_publish_time":1492179463312,"dist-tags":{"alpha":"0.3.0-alpha-2","beta":"0.3.0-beta-10","latest":"0.3.1","next":"0.3.0-beta-5"}}