Note: SocketIoClient is only compatible with Socket.io v2.x.x. Newer versions will not work
- Clone this repository.
- Install PlatformIO plugin for VSCode.
- In VSCode: File > New Window.
- Open PlatformIO plugin (left side, 'Bee' icon).
- Open project, select ESP folder.
- Open
src/main.cpp
, changeconst char * espId = "ESP-1";
to an unique indetifier name. - Optional: change host url to the ip adress of your node server, change ssid and password to connect to your wifi network.
- Build project.
- Flash project.
- Socket.io Note: SocketIoClient is only compatible with Socket.io v2.x.x. Newer versions will not work
- Clone this repository.
You have now 2 choices: Running the server with Docker (This will run all services) or just only the node server with nodejs.
Running server with nodejs.
- Make sure you have node and npm installed on your machine.
- Navigate to the folder
NodeServer/app/
with your terminal. - Execute this command to install all the node modules:
npm i
- Start the server with this command:
node index.js
Running server with docker
- Install docker and docker-compose on your machine.
- Navigate to the folder
NodeServer
with your terminal. - Start the server with this command:
docker-compose up -d
if you want to run the container in the background ordocker-compose up
if you want to see the live logs (works only when you are in the same folder where the docker-compose.yaml file is located).
If you are using docker to run the server, here are some usefull commands:
docker container ls
- See all your running containers.docker attach fpnode
- Watch live logs of the fpnode docker container.docker compose down
- If you want to terminate the docker containers that are running in the background (works only when you are in the same folder where the docker-compose.yaml file is located).- To terminate the container when you are watching the live logs, press
ctrl + c
.