Skip to content

Send or receive action commands to/from other clients when you are not publicly accessable

License

Notifications You must be signed in to change notification settings

byWulf/action-tunnel-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

action-tunnel-client

Send or receive action commands to/from other clients when you are not publicly accessable.

Installation

To use the client in your node project, just install it as a dependency:

npm install action-tunnel-client --save

Usage

Connecting

const ActionTunnelClient = require('action-tunnel-client');
const client = await Client.create('ws://localhost:3000/', 'auth-token');

Connect to the action-tunnel-server with its IP/DNS, port and auth token you defined at the server. See https://github.com/byWulf/action-tunnel-client for more information.

Sending actions

await client.send('statusLed', {color: '#ffaa00'});

Receiving actions

client.on('statusLed', (payload) => console.log('Changing led color to ' + payload.color));

About

Send or receive action commands to/from other clients when you are not publicly accessable

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published