#Deployment for socket.io applications.

1 messages · Page 1 of 1 (latest)

forest crane
#

So, this is my first time using NextJS and Typescript.

I have made a simple web chatting application ( No DB ), and I have used socket.io to make it. It works perfectly as intended on my localhost:3000.
( For reference if needed : https://github.com/JakeOJeff/stacks-against-you )

When I deploy the site to vercel, the chatting function doesn't work, which I found later that Vercel doesn't have websockets. So what should I do? I found things about Render, but I'm unaware on what I am supposed to do.

Heres my file Structure :

root/
- app
- public
- lib
- components
- package.json
- server.mts

and so on.

App folder contains the main pages of the app. Can someone really help me? It would be very kind. I am ready to answer anything that you didn't understand from my query.

GitHub

Contribute to JakeOJeff/stacks-against-you development by creating an account on GitHub.

mortal perchBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

haughty wasp
#

You need a separately hosted websocket server that you either write manually, host yourself using projects such as soketi or you have to fall back to third party services such as Pusher, Ably, etc.