NextJS + Express
Unanswered
Asiatic Lion posted this in #help-forum
Asiatic LionOP
Hi everyone !
I am building an app with NextJS 13 and an Express Server. I am using the App router (so it's a SSR app)
I mean that the Express server is powering my NextJS app, they are not separate servers.
Now I started to build as I am used to, meaning I wrote REST routes to get all my data from the "front".
But I just realized, isn't it useless? I mean what I call "the front" is actually running on the server 😛
So I could just call directly my DB models to get my data? Is that a good practice?
Has anyone ever done that ?
Thanks in advance
I am building an app with NextJS 13 and an Express Server. I am using the App router (so it's a SSR app)
I mean that the Express server is powering my NextJS app, they are not separate servers.
Now I started to build as I am used to, meaning I wrote REST routes to get all my data from the "front".
But I just realized, isn't it useless? I mean what I call "the front" is actually running on the server 😛
So I could just call directly my DB models to get my data? Is that a good practice?
Has anyone ever done that ?
Thanks in advance