xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

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/

PM2

$ 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

sequelize-cli

https://sequelize.org/

https://github.com/sequelize/sequelize

ORM

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

refs

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



©xgqfrms 2012-2020

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


原文地址:https://www.cnblogs.com/xgqfrms/p/12009505.html