What is Nostr?
frederik_diamond / FREDERIK DIAMOND
npub1nj0…2gqz
2025-02-22 21:42:19

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
Author Public Key
npub1nj0crmtetu84a7j43yegy358mp8u0e4ye7ndkhtd8dg0edll4mpqn52gqz