Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pm2ship

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pm2ship

a pm2 api wrapper

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

create a startup.coffee file

pm2Ship = require './lib/pm2/pm2Ship'
argv = require('yargs').argv;
config = require 'config'

apps = config.get 'pm2Ship.apps'

pm2Ship.app apps
.then (startedApps) ->
  for startedApp in startedApps
    console.log 'started:',startedApp
.catch (err) ->
  console.log 'err',err

process.on 'errException', (exception) ->
  console.log 'exception:', exception

sample config:

pm2Ship:
  apps:
#    Backend can not cluster by PM2 we use Nginx -> so duplicate by config
    -
      script: 'backend.coffee'
      nodename: pusher
      instances: 1
      max_memory_restart : '100M'
      exec_mode : 'cluster'
      env:
        PORT: 13000
    -
      script: 'backend.coffee'
      nodename: pusher
      instances: 1
      max_memory_restart : '100M'
      exec_mode : 'cluster'
      env:
        PORT: 13001

    -
      script: 'heartbeats.coffee'
      nodename: pusher
      instances: 1
      max_memory_restart : 100M
      exec_mode : cluster
      env:
        PORT: 0

coffee config

module.exports =
  pm2Start:
    apps: [
      {
      'script': 'myapp.coffee'
      'nodename': 'myHackingApp'
      'max_memory_restart': '100M'
      'instances': 1
      'exec_mode': 'cluster'
      }
    ]
      

Keywords

FAQs

Package last updated on 10 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc