#gitcheck.js This initializer checks plugin directories for git branches, and reports which branch is being loaded by the server.
I use npm link
to serve up my plugins-in-progress for actionhero. I ask npm's preinstall hook to run npm link $PLUGIN
so that the plugin will be in actionhero's node_modules dir when the main install happens.
It works very well for us, but when the gitflow is feverish I need to double check which branch I'm running in a given actionhero config.
I put this initializer at the projectRoot level, and it sweeps my plugins to report on git branches.
2015-05-19 20:46:51 - notice: environment: singlebox
2015-05-19 20:46:51 - notice: Plugin ah-spa-plugin is serving git branch: ⎇ master
2015-05-19 20:46:51 - notice: Plugin ah-app-plugin is serving git branch: ⎇ feature/bumpah
2015-05-19 20:46:51 - notice: *** Server Started @ 2015-05-19 20:46:51 ***