Skip to content

Instantly share code, notes, and snippets.

@tarajane
Created March 4, 2013 03:59
Show Gist options
  • Save tarajane/5079814 to your computer and use it in GitHub Desktop.
Save tarajane/5079814 to your computer and use it in GitHub Desktop.
A quick grunt task to activate a virtual env and start foreman. Used for our current python project config.
// Start server
grunt.registerTask('server', "Activate venv and start foreman.", function() {
var cmd = 'source venv/bin/activate \n';
cmd += 'foreman start';
exec(cmd, function(err, stdout) {
if (err) {
throw err;
}
grunt.log.write(stdout);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment