{"name":"remotedev-server","version":"0.3.0-beta-2","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"],"repository":{"type":"git","url":"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.12.6","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"},"gitHead":"8dbcb836ce0bdcfe5d54306dc477d70cdd2bf819","_id":"remotedev-server@0.3.0-beta-2","scripts":{},"_shasum":"3241180ad02f0d3c259961710c533d3341848773","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.8.0","_npmUser":{"name":"zalmoxisus","email":"zalmoxisus@gmail.com"},"dist":{"shasum":"3241180ad02f0d3c259961710c533d3341848773","tarball":"http://registry-npm.ywwl.com/remotedev-server/download/remotedev-server-0.3.0-beta-2.tgz","integrity":"sha512-493nPrCO7QlSATBK60hWOITB1H1ioJ0Dhtjf+QUdi/7JoZaGTSBouKQXcR5CzqVuAP7LcEIoBfBgOK6AytnY4A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4lyaqryLYdeBbJcXdfOtwrTlInLxLZMYR3+DvpAGItAIgB4hjP5LQVnY2G3fj+2Innt8Yn3DTBQJffvp5l4OjfOE="}],"size":9744,"noattachment":false,"key":"/remotedev-server/-/remotedev-server-0.3.0-beta-2.tgz"},"maintainers":[{"name":"zalmoxisus","email":"zalmoxisus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/remotedev-server-0.3.0-beta-2.tgz_1479117564272_0.675018911017105"},"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":1479117564791,"_cnpm_publish_time":1479117564791,"dist-tags":{"alpha":"0.3.0-alpha-2","beta":"0.3.0-beta-10","latest":"0.3.1","next":"0.3.0-beta-5"}}