Skip to content

Instantly share code, notes, and snippets.

@luizwbr
Created January 25, 2018 13:53
Show Gist options
  • Save luizwbr/850c1d4c46d0d748d43fd0c6ae61681f to your computer and use it in GitHub Desktop.
Save luizwbr/850c1d4c46d0d748d43fd0c6ae61681f to your computer and use it in GitHub Desktop.
var pm2 = require('pm2');
var path = require('path');
pm2.start({
name: "PostgresSql",
script: "/postgres/bin/postgres.exe",
args: "-D /postgres/data/pgsql/",
exec_mode: "fork_mode",
max_memory_restart: '2G',
autorestart: true,
output: "out.log",
error: "error.log"
}, function (err, apps) {
if (err != null) console.log(error);
pm2.disconnect();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment