Is my techstack valid?
Answered
Cuvier’s Dwarf Caiman posted this in #help-forum
Cuvier’s Dwarf CaimanOP
Hello wanna hear your insight about this, is Next.js (frontend no api directory) + Express.js (server-side) a good stack? cause I want to implement a websocket for real-time data or Vite + Express?. Why I chose Next is because of its file-based routing and can do SSR especially in my landing page that require fetching available cars
Answered by B33fb0n3
yea, that makes sense. Technically next.js is only serverless, when you run it on a serverless infrastructure. If you have a server and you run your app on it, then it's serverfull and you can enjoy all serverfull stuff.
I guess I would do it like that then as well. I would use fastify instead of express, but the idea is the same
I guess I would do it like that then as well. I would use fastify instead of express, but the idea is the same
5 Replies
@Cuvier’s Dwarf Caiman Hello wanna hear your insight about this, is Next.js (frontend no api directory) + Express.js (server-side) a good stack? cause I want to implement a websocket for real-time data or Vite + Express?. Why I chose Next is because of its file-based routing and can do SSR especially in my landing page that require fetching available cars
What you saying makes no sense for me:
But in the next sentence you saying:
pure client-sideso clientside only.
But in the next sentence you saying:
can do SSRit stands for SERVER side rendering. Can you clarify this?
Cuvier’s Dwarf CaimanOP
what i mean is Nextjs (frontend only, no api directory) + Expressjs (for backend)
@Cuvier’s Dwarf Caiman what i mean is Nextjs (frontend only, no api directory) + Expressjs (for backend)
ah ok, and why dont you want to handle both things in the same framework?
@B33fb0n3 ah ok, and why dont you want to handle both things in the same framework?
Cuvier’s Dwarf CaimanOP
I dont know how to setup a websocket in fullstack nextjs and also due to its serverless? correct me if im wrong hehe just exploring things. My experience setting up socket io is using Vite + Express thats why I come up with this approach
yea, that makes sense. Technically next.js is only serverless, when you run it on a serverless infrastructure. If you have a server and you run your app on it, then it's serverfull and you can enjoy all serverfull stuff.
I guess I would do it like that then as well. I would use fastify instead of express, but the idea is the same
I guess I would do it like that then as well. I would use fastify instead of express, but the idea is the same
Answer