Nuxt 3 local socket.io server for testing
Look at the Nuxt 3 documentation to learn more.
Make sure to install the dependencies:
# npm
npm install
# pnpm
pnpm install
# yarn
yarn install
Start the development server on http://localhost:3000
:
# npm
npm run dev
# pnpm
pnpm run dev
# yarn
yarn dev
-
Add your code for testing on client side
-
Add your code for testing on server side
- Don't forget to add the corresponding event to the socket on server side (this project)
-
Make sure the path and port inside the client is refering to the correct server path and port
-
Run THIS PROJECT FIRST so the server would be at
http://localhost:3000
- Otherwise, you must adjust the server path on the client side (the main project you are testing)
-
Run the project containing the client you want to test
-
Once the server and client are connected, you should see a message containing the created socket id on
http://localhost:3000
- If the message is nos visible, check the port inside @/io/client.js inside this project