rlgc

1.0.0 • Public • Published

CircleCI

remote-logger-g-cell

This is a JavaScript remote logger. It enables you to read logs from a webapp running on any device such as smartphones and read the console logs in the browser, with minimal setup.

Getting started

Install the server utilities.

npm i -g rlgc

Install the client library.

npm install remote-logger-g-cell

In your webapp import the client library.

let rlgc = new RLGC();
rlgc.init("http://localhost", 5000);

The port used must match --ws-port when running rlgc --mode server --ws-port 5000 --console-ws-port 4000, just like in the example above.

Start the server on a given ports

The following command will start a express server listening on port --ws-port for messages sent by the client rlgc app. The port --ui-port will be used to forward the messages to the user interface.

rlgc --mode server --ws-port 5000 --console-ws-port 4000

Start the user interface on a given port

The following command will start a react app on port --console-app-port and display messages sent from the rlgc server app. The port --console-ws-port will be used to transport the messages from the server to the user interface. The port --console-ws-port must also match the --ui-port.

rlgc --mode ui --console-app-port 4005 --console-ws-port 4000

Now you can open http://localhost:4005/ and see your logs.

Test app

The following command will start a react app on port --console-app-port

rlgc --mode test-app --console-app-port 3005 --console-ws-port 5000

Now you can open http://localhost:3005/ and click the test button. The console logs will also be displayed on http://localhost:4005/.

Readme

Keywords

none

Package Sidebar

Install

npm i rlgc

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

1.25 MB

Total Files

44

Last publish

Collaborators

  • ggcaponetto