PM2 in depth
阅读原文时间:2023年07月08日阅读:4

PM2 in depth

ecosystem.config.js

module.exports = {
  apps : [{
    name: "app",
    script: "./app.js",
    env: {
      NODE_ENV: "development",
    },
    env_production: {
      NODE_ENV: "production",
    }
  }]
}


# $ pm2 [start|restart|stop|delete] ecosystem.config.js

$ pm2 start ecosystem.config.js

https://doc.pm2.io/en/runtime/guide/ecosystem-file/

https://pm2.keymetrics.io/docs/usage/application-declaration/

$ yarn global add  pm2
# OR
$ npm install pm2 -g

# global
$ pm2 start server/index.js


$ yarn add -D pm2
# OR
$ npm i -D pm2

# local
$ ./node_modules/pm2/bin/pm2 start server/index.js

$ ./node_modules/pm2/bin/pm2 list

# $ ./node_modules/pm2/bin/pm2 stop ID
$ ./node_modules/pm2/bin/pm2 stop 0

$ ./node_modules/pm2/bin/pm2 monit

https://pm2.keymetrics.io/docs/usage/application-declaration/

https://stackoverflow.com/questions/47166609/how-can-i-get-pm2-to-use-my-ecosystem-config-js-file-on-reboot

sequelize-cli

https://sequelize.org/

https://github.com/sequelize/sequelize

Object Relational Mapping 对象关系映射

Table => Object, 简化 SQL 查询命令的编写

https://en.wikipedia.org/wiki/Object-relational_mapping

https://stackoverflow.com/questions/1279613/what-is-an-orm-how-does-it-work-and-how-should-i-use-one

https://www.cnblogs.com/xgqfrms/p/13621076.html



xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


手机扫一扫

移动阅读更方便

阿里云服务器
腾讯云服务器
七牛云服务器

你可能感兴趣的文章