• Now all data be ready for publish, We had made our blog alive now. Haha.



  • These days CCP GFW blocked all the IPs from US and when I switch my IP in google Cloud, the disk data cannot be restore again. I have to restart my blog totally, Now the website is still building…



Q: nuxt.js: where is the .js for running nuxt start – Stack Overflow

Vue PingBook 2 months ago (10-23) 33 0

Question

nuxt version: 2.4.3

I’m using node process manager (pm2) for my node.js hosting. To run nuxt on development server, you can simply nuxt or npm run dev but that’s not the case if you’re using pm2’s ecosystem.config.js which needs you to specify which file actually runs that.

For example, to run a developement server I have to point to the file that runs it which is ./node_modules/nuxt/bin/nuxt.js

But I have no idea which file that run production server or nuxt start

Can someone points me which file in ./node_modules/nuxt or ./node_modules/@nuxt that perform nuxt start?

–edit
This article covers how you run nuxt start with pm2 but aforementioned file ./node_modules/nuxt/bin/nuxt-start does not exists on mine. I suspect because we are using different nuxt version

Answer

Js file you are looking for (nuxt > 2.3)

node_modules/nuxt/bin/nuxt.js

When using pm2, I’m doing it this way (ecosystem.yml)

apps:
- name: client
  script: node_modules/nuxt-start/bin/nuxt-start.js
  cwd: /root/app/client
  max_memory_restart: "250M" 
  args: "start" 

Notice that for production in this case I’m using nuxt-start dependency to speed up npm i.




Copyright from PingBook Blog, If not specified, they are original. This site uses BY-NC-SAProtocol authenticated.
For reprinting, please indicate the link of the original text:Q: nuxt.js: where is the .js for running nuxt start – Stack Overflow
LIKE (0)
[1725641479@qq.com]
SHARE (0)
PingBook
Author:
We create, We sharing! Tag every value data your sharing
Submit comments
Cancel comments
emoji picture bold strikethrough center italic check in

Hi,you need to provide your name and email adress!

  • Name (Required)
  • Email (Required)
  • Website