Next JS - Deploy server in shared plan Hostinger

459 views Asked by At

I have recently started in the world of professional web development. I recently started a project to create a website.

I created the website with Next JS v13.5.3 with App Router. The website generates dynamic routes, it is mostly created with components and also consults various data in a json file.

In development mode everything is great. The doubt comes when deploying the server. I would like to deploy it on Hostinger shared plan.

I have reviewed information on the internet for days and I have been able to find something, but all the examples generate a static website with server.js, without an app router, without dynamic routes and I don't know if this can work.

If anyone has achieved something similar before, it would be of great help.

1

There are 1 answers

1
mendoza87 On BEST ANSWER

As far as I can see, you can't deploy a Next.js app with all its features via Hostinger. To run Next.js, you'd need a server running Node.js, which Hostinger doesn't provide check link A simple option would be to just deploy a static export: Some features would not be supported, but you can still export all your needed pages/routes at build time and make a new build and re-deploy when your content changes or you add pages.