How does Next.js SSR working exactly.
If I don't care SEO at all then I can use React right? What if i care about SEO and don't want/need a node.js server in my background.
I have an API written in PHP. I tried in my local server to send requests from Next app to PHP Backend. In a real application do i have to create a Node.js backend in my server or is it enough to install Node and Npm only to install Next and it's dependencies?
How does Next.js SSR working exactly.
If I don't care SEO at all then I can use React right? What if i care about SEO and don't want/need a node.js server in my background.
I have an API written in PHP. I tried in my local server to send requests from Next app to PHP Backend. In a real application do i have to create a Node.js backend in my server or is it enough to install Node and Npm only to install Next and it's dependencies?
Share Improve this question edited Aug 30, 2021 at 17:31 Doğukan Akkaya asked Apr 21, 2020 at 16:24 Doğukan AkkayaDoğukan Akkaya 5031 gold badge3 silver badges13 bronze badges1 Answer
Reset to default 16Any page that uses getServerSideProps, Next.js converts that page to a lambda function. You don't need a node server running 24/7 for hosting your application.
Also, if you don't use getServerSideProps, Next.js by default will pre-render your page, this page gets cached on a CDN.
So yes you can make API calls to your PHP backend, without the need for a setting up a nodejs server yourself.
Hope that answers your question.
Thanks