One-time setup:
npm install
And then:
- Get sources building automatically
- Serve root directory with a HTTP server
- Run local websocket server
Continually rebuild source to dist/index.mjs
:
npm run dev
Start a live-server or similar to serve the root directory.
The sender/receiver sketch might need to have options set when creating the Remote
instance. This is it tries to connect to the local Node server (step 3) instead of the live server.
const r = new Remote({
websocket: `ws://127.0.0.1:8080/ws`,
allowNetwork: true
});
One-time setup:
cd server
npm install
To start server:
cd server
node server.js