4. Deploying to production is complex
• Oh noes why my app only use 10% of my server CPUs?
• Oh noes which app is leaking memory?
• Why the server went out of memory?
• Oh noes my app crashed!
• Where are my damn logs?
• How do I organize my micro service app?
• …. …. …. ….
38. What is a module?
An app that extend PM2 capabilities
or
A worker process providing an API
or
A totally independant software
39. Installing a module
$ pm2 install <module-name>
It gets the module from NPM
then Start it
and Keep it alive forever
http://docs.keymetrics.io/docs/usage/building-module/
40. Managing modules
$ pm2 uninstall <module-name>
$ pm2 install <module-name>
Install a module:
Uninstall:
$ pm2 set <module-name>:<attr> <value>
Set configuration option:
http://docs.keymetrics.io/docs/usage/building-module/
47. Writing your own module
$ pm2 module:generate sample-module
Create a sample module:
Documentation:
Google -> pm2 module system
Official modules repositories:
http://github.com/pm2-hive/