frederik_diamond on Nostr: This afternoon I’ve been working on implementing the notification system in my ...
This afternoon I’ve been working on implementing the notification system in my portfolio project.
I settled on using Socket.IO running in an Express server.
I had to do some restructuring as I did not want to implement a custom server running Socket.IO directly inside of NextJS. Because then I lose Turbopack (I think if I understood the docs correctly).
So I made two directories in the project:
- `client/` for the NextJS project
- `server/` for the Express and Socket.IO
It’s up and running. One of the notifications is when a user publishes a new post. That’s the only one working currently, but the plan is to implement more notification types.
It takes a little while before the notification is received. Not sure why.
I did a project in last semester of my SE degree where we used SignalR connected to Blazor, and the notifications were received instantly. I want this NextJS and Socket.IO project to be the same. I’ll have to tinker with it tomorrow. Also need to make the notification UI nicer.
#dev #NextJS #SocketIO #NodeJS #portfolio
I settled on using Socket.IO running in an Express server.
I had to do some restructuring as I did not want to implement a custom server running Socket.IO directly inside of NextJS. Because then I lose Turbopack (I think if I understood the docs correctly).
So I made two directories in the project:
- `client/` for the NextJS project
- `server/` for the Express and Socket.IO
It’s up and running. One of the notifications is when a user publishes a new post. That’s the only one working currently, but the plan is to implement more notification types.
It takes a little while before the notification is received. Not sure why.
I did a project in last semester of my SE degree where we used SignalR connected to Blazor, and the notifications were received instantly. I want this NextJS and Socket.IO project to be the same. I’ll have to tinker with it tomorrow. Also need to make the notification UI nicer.
#dev #NextJS #SocketIO #NodeJS #portfolio