This is a Next.js project bootstrapped with create-next-app.
- Install Node.js (v20.12.2 recomanded)
# Check if Node.js is installed
$ node -v
v20.12.2- Install Node.js libraries
$ cd <repo-dir>
$ npm i- Run
$ npm run build
$ npm run startOpen http://localhost:3000 with your browser to see the test pages (sender or receiver).
Request the following HTTP GET/POST to the server (:3000)
GET http://localhost:3000/api/sendNumber?room=myRoomName&data=7or
POST http://localhost:3000/api/sendNumber
Content-Type: application/json
{
"room": "myRoomName",
"data": 7
}-
Connect to
ws://localhost:3001 -
Send the following JSON text
{
"type": "moveToRoom",
"roomId": "<room-name-to-join>"
}- Listen the following JSON text
{
"type": "numData",
"data": 7
}See esp32/ESP-IDF/README.md or esp32/PlatformIO/README.md
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!