M
M
Maxim Zolotoy2021-10-12 03:37:44
Node.js
Maxim Zolotoy, 2021-10-12 03:37:44

How to run next application on VPS?

I want to learn how to deploy Next applications on VPS.
Locally I do yarn build, yarn serve and I have the site running on localhost:3000

But how do I run it on a VPS so that the site is available on port 80 of a specific domain?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rag'n' Code Man, 2021-10-12
@iDmitriyWinX

On a VPS, yarn serve runs exactly the same way, and it runs locally on your server. And there you can already use NGINX as a reverse proxy. That is, when requesting your domain, nginx will return data from localhost:3000.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question