Skip to content

Local console server to communicate web app through socketio with mobile robot

Notifications You must be signed in to change notification settings

kiwicampus/socketio-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

This implements the tools necessary for running the local console interface used to control the robot.

Screenshot from 2021-12-07 19-33-48

Architecture

This repo implements 3 components:

  1. A socket-io server that runs locally on the machine which just relays messages received from clients to other clients.
  2. An http server that serves the local console interface.
  3. The web app interface which implements the GUI and which also has a socket-io client to send messages to the local server which will be relayed to the robot.

Number 1 and 2 are pretty simple since its job is just to relay messages. The 3 is the main component of this repo and the one that normally is modified to shape the local GUI to our needs. The code for this lives under the public folder.

Requirements

  • node
  • npm

Installing node and npm

The easiest way is to use nvm (node version manager)

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
source ~/.bashrc

Then simply install the node version you want. For our case the latest (v16.0.0) works

nvm install 16.0.0

Dependencies

npm install

Start Server

node index.js

About

Local console server to communicate web app through socketio with mobile robot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published