Answer the question
In order to leave comments, you need to log in
How to run vue in serve mode on prod via nginx?
I run it on the production through the yarn dev
console
The block itself is in package.json
"scripts": {
"serve": "vue-cli-service serve --port 3000",
"dev": "npm run serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
location /mydir {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question