remote-log-websocket
v1.0.0
Published
Remote log client/server implementation using WebSocket
Downloads
2
Readme
remote-log-websocket
Usage
Installation
$ npm install --save remote-log-websocket
Client
On your application, just use the client with JavaScript (ES5):
require('remote-log-websocket').default('ws://localhost:12345')
...or with Babel/TypeScript:
import remoteLogWebsocket from 'remote-log-websocket'
remoteLogWebsocket('ws://localhost:12345')
Server
From command line:
remote-log --host 0.0.0.0 --port 12345
...or with environment variables:
REMOTE_LOG_HOST=0.0.0.0 REMOTE_LOG_PORT=12345 remote-log
...or from your own NodeJS wrapper:
require('remote-log-websocket/server').default('0.0.0.0', 12345)
...or with Babel/TypeScript/ts-node:
import remoteLogWebsocketServer from 'remote-log-websocket/server'
remoteLogWebsocketServer('0.0.0.0', 12345)