Skip to content

Instantly share code, notes, and snippets.

@xcarpentier
Last active November 21, 2017 17:33
Show Gist options
  • Save xcarpentier/c7fba265c6c3f082dc17 to your computer and use it in GitHub Desktop.
Save xcarpentier/c7fba265c6c3f082dc17 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
function launchSupervisor {
echo " #############################"
echo " ! Supervisor will be START !"
echo " #############################"
supervisor -e 'js|ejs|node|coffee' -p 1000 -x npm -- start
}
function main {
issupervisorinstalled=$(npm list supervisor 2>&1 | grep "empty")
if [ -n "$issupervisorinstalled" ]; then
echo " ##############################"
echo " ! Supervisor will be INSTALL !"
echo " ##############################"
npm install supervisor -g
launchSupervisor
else
launchSupervisor
fi
}
main
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment