Answer the question
In order to leave comments, you need to log in
How to deploy a nuxt application?
Hello. I'm just starting to understand this topic and it's not entirely clear to me how to implement the application on a production server.
To build a nuxt application, you need to run npm run build
To run a nuxt server in production mode, you need to run npm start
After that, the application is available at localhost:3000. This is enough for development.
How to upload the application to the server? Use FTP? Or git push
? Or maybe some kind of Codeship service for example? How to stop an already running nuxt server and then start it back? Do I need to use nginx?
Answer the question
In order to leave comments, you need to log in
How to upload the application to the server? Use FTP? Or git push? Or maybe some kind of Codeship service for example?
kill -9 <pid процесса>
:) In general, there should be some kind of nodemon / pm2 / forever, which restart the process when the code changes.Hello.
As mentioned above, I clone from github (then it is convenient to do pull when changing the code)
The application needs to be run, let's say, in the background, for this I use pm2 on the server.
Command order:
1. Clone / pull the project
2. npm install
3. npm run build
4. pm2 start app
To stop: pm2 stop app
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question