Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
zalmoxisus committed Sep 11, 2016
1 parent 65d8f1a commit 629a490
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RemoteDev Server
================

Bridge for connecting [remotedev monitor app](https://github.com/zalmoxisus/remotedev-app) with [Remote Redux DevTools](https://github.com/zalmoxisus/remote-redux-devtools) or [RemoteDev](https://github.com/zalmoxisus/remotedev) using a local server. Running a local server is optional, you may use [remotedev.io](https://remotedev.io) server instead, which is by default.
Bridge 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.

### Installation

Expand All @@ -19,7 +19,7 @@ npm install --save-dev remotedev-server
}
```

So, you can start local server by running `npm run remotedev`.
So, you can start remotedev server by running `npm run remotedev`.

##### Import in your `server.js` script you use for starting a development server:

Expand All @@ -36,7 +36,11 @@ So, you can start remotedev server together with your dev server.
remotedev --hostname=localhost --port=8000
```

Change `hostname` and `port` to the values you want.
### Connection settings

Set `hostname` and `port` to the values you want. `hostname` by default is `localhost` and `port` is `8000`.

To use WSS, set `protocol` argument to `https` and provide `key`, `cert` and `passphrase` arguments.

### Inject to React Native local server

Expand All @@ -50,9 +54,7 @@ Change `hostname` and `port` to the values you want.

The `injectserver` value can be `reactnative` or `macos` ([react-native-macos](https://github.com/ptmt/react-native-macos)), it used `reactnative` by default.

Then, we can start React Native server and RemoteDev server with one command:

![Inject server](https://cloud.githubusercontent.com/assets/3001525/16925822/92b6b3ac-4d58-11e6-9f36-d57dac8892c4.png)
Then, we can start React Native server and RemoteDev server with one command (`npm start`).

##### Revert the injection

Expand All @@ -68,6 +70,8 @@ Or just run `$(npm bin)/remotedev --revert`.

### Connect from Android device or emulator

> Note that if you're using `injectserver` argument explained above, this step is not necessary.
If 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:

```
Expand All @@ -76,6 +80,24 @@ adb reverse tcp:8000 tcp:8000

If 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).

### Save reports and logs

You 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).

Remotedev Server is database agnostic. By default everything is stored in the memory, but you can persist data by specifying one of the jsData adapters above to `adapter` argument. Also you can add an `dbOptions` argument for database configuration. If not provided the default options will be used (for some adapters, like `sql`, it's required). You have to install the necessary adapter's npm package.

| Storage | `--adapter` | `--dbOptions` example | install | |
|-----------|-------------|------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------|---|
| Firebase | firebase | `{ basePath: 'https://my-app.firebase.io' }` | `npm install --save js-data-firebase` | |
| HTTP | http | `{ basePath: 'https://my-rest-server/api' }` | `npm install --save js-data-http` | |
| LevelUp | levelup | `'./db'` (the levelup "db" object will be available at "adapter.db") | `npm install --save js-data-levelup` | |
| MongoDB | mongodb | `{ name: 'user', idAttribute: '_id', table: 'users' }` | `npm install --save js-data-mongodb` | |
| MySQL | sql | `{ client: 'mysql', connection: { host: '123.45.67.890', user: 'ubuntu', password: 'welcome1234', database: 'db1' }` | `npm install --save js-data-sql` | |
| Postgres | sql | `{ client: 'pg', connection: { host: '123.45.67.890', user: 'ubuntu', password: 'welcome1234', database: 'db1' }` | `npm install --save js-data-sql` | |
| Redis | redis | See the configurable options for [`node_redis`](https://github.com/NodeRedis/node_redis) | `npm install --save js-data-redis` | |
| RethinkDB | rethinkdb | `{ host: '123.456.68.987', db: 'my_db' }` | `npm install --save rethinkdbdash js-data-rethinkdb` | |
| SQLite3 | sql | `{ client: 'sqlite3', connection: { host: '123.45.67.890', user: 'ubuntu', password: 'welcome1234', database: 'db1' }` | `npm install --save js-data-sql` | |

### License

MIT

0 comments on commit 629a490

Please sign in to comment.