• Stars
    star
    183
  • Rank 210,154 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 9 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Connect Redux DevTools extension to a remote app.

RemoteDev Server

This package was renamed to redux-devtools-cli and merged into redux-devtools monorepo. Please refer to that repository for the latest updates, issues and pull requests.

Bridge for communicating with an application remotely via Redux DevTools extension, Remote Redux DevTools or RemoteDev. Running your server is optional, you can use remotedev.io instead.

Installation

npm install --save-dev remotedev-server

Also there's a docker image you can use.

Usage

Add in your app's package.json:
"scripts": {
  "remotedev": "remotedev --hostname=localhost --port=8000"
}

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

Import in your server.js script you use for starting a development server:
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

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.

Available options

Console argument description default value
--hostname hostname localhost
--port port 8000
--protocol protocol http
--key the key file for running an https server (--protocol must be set to 'https') -
--cert the cert file for running an https server (--protocol must be set to 'https') -
--passphrase the key passphrase for running an https server (--protocol must be set to 'https') -
--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. -
--logLevel the socket server log level - 0=none, 1=error, 2=warn, 3=info 3
--wsEngine the socket server web socket engine - ws or uws (sc-uws) ws

Inject to React Native local server

Add in your React Native app's package.json:
"scripts": {
  "remotedev": "remotedev --hostname=localhost --port=8000 --injectserver=reactnative"
}

The injectserver value can be reactnative or macos (react-native-macos), it used reactnative by default.

Then, we can start React Native server and RemoteDev server with one command (npm start).

Revert the injection

Add in your React Native app's package.json:

"scripts": {
  "remotedev-revert": "remotedev --revert=reactnative"
}

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 to setup port forwarding from the device to your computer:

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 or remotedev.

Save reports and logs

You can store reports via redux-remotedev and get them replicated with Redux DevTools extension or 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.

Remotedev server is database agnostic using knex schema. By default everything is stored in the memory using sqlite database. See 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:

{
  "client": "pg",
  "connection": { "user": "myuser", "password": "mypassword", "database": "mydb" },
  "debug": false,
  "migrate": true
}

Advanced

License

MIT

More Repositories

1

redux-devtools-extension

Redux DevTools extension.
JavaScript
13,500
star
2

remote-redux-devtools

Redux DevTools remotely.
JavaScript
1,804
star
3

crossbuilder

Building web, Electron, Cordova and Chrome apps, and cross-browser extensions with React, Redux and Webpack. "Write once, deploy everywhere" concept in practice.
JavaScript
483
star
4

mobx-remotedev

MobX DevTools extension
JavaScript
327
star
5

redux-remotedev

Redux DevTools for production (web and React Native) with a highly flexible API.
JavaScript
267
star
6

remotedev-app

Remote Redux DevTools monitor app.
JavaScript
158
star
7

remotedev

Remote debugging for any flux architecture.
JavaScript
143
star
8

atom-redux-devtools

Redux DevTools Atom package
CoffeeScript
140
star
9

redux-devtools-filter-actions

Redux DevTools composable monitor with the ability to filter actions.
JavaScript
77
star
10

social-expert

Master your GitHub notifications by priority and weight.
JavaScript
59
star
11

redux-devtools-instrument

Redux DevTools instrumentation. Moved to redux-devtools monorepo.
JavaScript
41
star
12

remotedev-serialize

Serialize "unserializable" data and parse it back.
JavaScript
25
star
13

redux-notify

Notify when specified redux actions are dispatched.
JavaScript
17
star
14

devui

Reusable React components for building Redux Devtools monitors.
JavaScript
16
star
15

redux-devtools-test-generator

Generate tests right in Redux DevTools.
JavaScript
14
star
16

momentjs-datetimepicker

jQuery Date and Time Picker using Momentjs format and translations.
JavaScript
14
star
17

browser-redux-sync

Keep redux states in sync for browser extensions and apps.
JavaScript
13
star
18

react-chat

WIP
JavaScript
12
star
19

react-switcher

Stateless React switcher component to toggle container states.
JavaScript
7
star
20

crossmessaging

Crossextension messaging.
JavaScript
6
star
21

chrome-storage-local

Use the same api for chrome.storage.local as for localStorage.
JavaScript
5
star
22

horizon-remotedev

Horizon DevTools extension.
JavaScript
4
star
23

browser-redux-bg

Messaging library for Cross-browser extensions and Chrome apps.
JavaScript
3
star
24

remotedev-utils

Moved to https://github.com/reduxjs/redux-devtools/tree/master/packages/redux-devtools-core
JavaScript
2
star
25

zalmoxisus.github.io

HTML
2
star
26

boilerplate

JavaScript
1
star
27

remotedev-slider

Redux DevTools Slider monitor with remote reports
JavaScript
1
star