Answer the question
In order to leave comments, you need to log in
Set up a VPS and deploy a project on Nuxt?
Hello.
The day has come when I need to roll out my first Nuxt project.
For almost a week now I have been looking for a manual for setting up vps under nuxt.
Do I understand correctly that the procedure should be like this ( OS Ubuntu ):
- connect via SSH to the server;
- install git and clone the project repository (question: where exactly? to the root? or should there be some kind of working folder?);
- I install node.js and npm (db is not needed) in the same place (is nginx also needed at the same time? if so, how to install it?);
- install all the dependencies that I have in package.json;
- after all this, you need to run the project npm run start, because I have:
"scripts": {
"dev": "cross-env NODE_ENV=development nodemon server/index.js --watch server",
"build": "nuxt build",
"start": "cross-env NODE_ENV=production node server/index.js",
"generate": "nuxt generate",
"heroku-postbuild": "npm run build"
},
? Answer the question
In order to leave comments, you need to log in
It is better not to clone the project, and use special deployment tools. In this case, the build does not take place on the server where it will be executed, but on the build machine.
It is better to create a special user and deploy the project in his directory.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question