K
K
kr_ilya2019-04-30 16:29:56
Vue.js
kr_ilya, 2019-04-30 16:29:56

What is the correct way to run a vue + node project on the server?

I'm new to this topic, so some banal questions arise:
I npm run buildran the command on local and got a dist folder with a minified project. I uploaded all the files to the server, namely:
5cc84b04dc6cd237797479.png
I was able to launch the back-end on port 3000 by the command: nodemon server/server.js
How to run vue? I'm running npm run dev but it's running on port 8080 and I suspect it's not running from the dist folder. How to run a project from the dist folder (or am I talking nonsense and this folder is not for this))) so that it is available in the root directory of the domain? What files and folders should be on the server (based on those on the screen)?

Piece from package.json

"version": "1.0.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"dev": "npm run serve",
"build": "vue-cli-service build",
"runw-pack": "webpack",
"lint": "vue-cli-service lint",
"start": "nodemon server/server.js"
},

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
RidgeA, 2019-04-30
@RidgeA

https://cli.vuejs.org/guide/deployment.html#genera...
and the node should be run as usual

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question