npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

remotedev-server

v0.3.1

Published

Run the RemoteDev monitor on your local server.

Downloads

7,471

Readme

RemoteDev Server

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