4 ms·
I used PHP to write a back end for a mobile app 14 years ago. It got the job done mostly fine. Now I'm doing the same thing, and decided to go with Deno becaus
by DidYaWipe 2y ago
I used PHP to write a back end for a mobile app 14 years ago. It got the job done mostly fine.
Now I'm doing the same thing, and decided to go with Deno because I wanted to learn JavaScript.
Does something like Next replace something like Deno, or does it work with it?
- mrinfinitiesx 2y agoNextJS is pretty much the go-to for making decent webapps, check out KeystoneJS if you want to make a custom CMS.
- DidYaWipe 2y agoThanks, but that doesn't address my question. Let me rephrase: Is NextJS a full back-end, or is it only for presentation? Would you use it in combination with something like Deno, or instead of it?
- mhio 2y agoNext.js won't require a Deno backend. You can define backend data fetches [0] along with the UI Pages and routes for an API [1]. Of course the NextJS application could call out to a Deno backend as well, but the external app is not required. - [0] https://nextjs.org/docs/pages/building-your-application/data-fetching/get-server-side-props https://nextjs.org/docs/pages/building-your-application/data... - [1] https://nextjs.org/docs/pages/building-your-application/routing/api-routes https://nextjs.org/docs/pages/building-your-application/rout...
- DidYaWipe 2y agoThanks!
- DidYaWipe 2y agoWho downvotes a completely relevant question? Pathetic.
- jemmyw 2y agoNextJS is just for building the frontend. If you have an API layer written in Deno or whatever then you still need that. Reading online there seems to be a lot of confusion about what NextJS is with questions like is it better than nodejs, is it a backend server etc. It runs on a server, on nodejs, but it doesn't provide what most people think of as the backend. It serves the frontend files. It does a bunch of extra things for the frontend. Presumably there is a way to run your own api code alongside it in the same node instances. Not sure if that's wise or not. I personally prefer to start off with a plain react project with vite as the bundler and then host that statically without the extra SSR stuff. For an app website I think that's a better approach. For a informational website I'd probably look to other solutions.