I host a domain on plesk server. It contain Nodejs V 12.4.0
, I am not using anything like express or so.. I Just create nuxt app using create-nuxt-app
in my pc using NodeJs V. 16
, then run command npm run build
, Then after I uploaded the files/folder(.nuxt, nuxt.config.js, static and package.json) on server to folder httpdoc/merostatus.com/(uploaded all files/folder here).
Setting on Nodejs in server:
Document Root : /httpdocs/merostatus.com/static
Application Mode : production
Application URL : http://merostatus.com
Application Root : /httpdocs/merostatus.com
Application Startup File : node_modules/nuxt/bin/nuxt.js
After this setting I click on NPM install button on Plesk and Restart App
But the output is not as desired. It is searching for pages folder, When I point Application Startup File to .nuxt/server.js It doesn't found vue instance.
My server is on live just now for addressing issue https://merostatus.com
I am currently using Plesk VPS server with OS Ubuntu 20.04
I solved the issue by making change in following ways
Step 1: Added nuxt-start module : npm install --save nuxt-start
Step 2: Build the project : npm run build
Step 3: Upload project to server including all dependencies (Whole project not only .nuxt)
Step 4: Changing Setting on Nodejs in server:
Document Root: /httpdocs
Application Mode: production
Application URL: http://merostatus.com
Application Root: /httpdocs
Application Startup File: node_modules/nuxt-start/bin/nuxt-start.js