ApiTunnel
express-apitunnel
Expose local web services to remote express.js application
About
express-apitunnel allows to expose a web service running on a local device to an express.js api.
Here are some wonderful things you can do with it:
- Control devices in your local network from anywhere
- Perform large tasks on a local machine (downloading files for example)
- Hook your IP camera feed to an express route
- You can hook more than one worker to one express route and the server will automatically balance load among them.
- You can turn on your teapot while you still at the office...
- ...
Usage
Local Server -> Api Tunnel -> Public Server -> Browser/Clent
On a public server
const socketio = ; const express = ; const app = const io = // Require server plugin const apitunnel_server = ; // your application logic ...
On a local device
const apitunnel_client = ;
On a client
~$ curl -i https://example.com/home-devices/raspberry/getTorrentList
-# https://example.com/{endpoint}/{unit name}/{device url}
Credits
express-apitunnel is based on Ericbarch's socket-tunnel
License
This project is licensed under the MIT License - see the LICENSE file for details