I am currently programming Node.js with Express.js, and every time I change a line of code in the file router or app, I need to type the command:   pm2 reload id_project.   How do I make pm2 auto-reload the project when a file is changed?...
I have a website using nodejs. Problem is when user upload images the site stop working. That because of PM2 restart server when file change I think. How to solve this problem. thank you...
Issuing "pm2 restart all" will restart all of the processes pm2 is managing.  I am wondering:  If there have been changes to any of the source files, does this actually reload the changes?  Or does it just restart the existing pm2 process in...
I am using ES6 modules by adding the --experimental-modules arguments to Node. Running node --experimental-modules app.mjs works perfectly fine. However, when I run the same command with pm2 I get the following error:     Error [ERR_REQUIRE_ESM]: Mus...
I have an existing PM2 process that I would like to add the "--max-memory-restart" setting to. How can I do that? The process was created from the command line without a JSON file.  If I were creating a new process I would just run:  PM2 star...
Previously, I had node version v0.10.46 installed on my ec2 server. For a recent project, I decided to give pm2 a try and installed pm2 using  npm install pm2 -g.  But, pm2 start index.js errored out since the project was using some ES6 syntax with a...
I use the awesome pm2 package to keep my node.js apps alive, but i have an issue I don't know how to fix.  One of my apps requires several scripts, a server and a few clients. Often when I restart my server, all the script are restarted, but conn...
I am starting instances of my app as a package.json script with PM2 this way:  "start:pm2": "pm2 start -i max node myapp.js"   I found out that not all members in the team always want to use max as a value for instances number while d...
This is my main.js file:  import Koa from "koa";  const app = new Koa(); app.use(async ctx => ctx.body = "Hello, World!"); app.listen(3000);   This is my package.json file:  {   "type": "module",   "name": &...
I'm using pm2 and node js.  What I want to do is set a maximum memory limit for an application.  My dev server's limit is 500mb split between two applications.  Ideally I would like to limit it to 200mb.  I need this limit to be a hard limit...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.