jnrnice.blogg.se

Install npm windows
Install npm windows












Now, we will move that folder to a brand new folder: c:\etc\.pm2įollow these steps: 1. I recommend to run your PM2 commands and check how files change in that folder. When you install PM2 ( npm install -g pm2), it creates a default PM2 home folder (under C:\Users\\.pm2) that will store PM2 relevant files, like logs (yes, the same you see running pm2 logs), process pid or the dump that is created when you run pm2 save. restore previously saved configuration ( pm2 resurrect) > PM2_HOME save current configuration ( pm2 save) 4. load a predefined configuration ( pm2 reload ) 3. start/stop/list components ( pm2 start apps/app1.js) 2. It provides several benefits, like for example logs management, automatic restart policies, application monitors, plus other things I’m missing. PM2 allows you to handle you application deployments. ( spoiler: I still didn’t find a solution for that) > PM2 optionally, I would prefer my app to run with a Windows Local user, not Administrative user.

install npm windows

(I want, at least, discriminate production against dev, staging, uat, …) 3. app startup must accept an input parameter, which is “env” in my case. I want my app to be placed on different drive than C: - as a best practice, app shouldn’t be placed on the same drive of Windows OS.

install npm windows

Why an app like that? This is to simulate a basic complexity and avoid the super-simple node index.js use case (that is as easy as useless).














Install npm windows