Skip to content

Instantly share code, notes, and snippets.

@creationix
Created July 16, 2011 19:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save creationix/1086699 to your computer and use it in GitHub Desktop.
Save creationix/1086699 to your computer and use it in GitHub Desktop.
A proposed hook into node.js to make deploying node based applications easy and not require re-compiles.
startup.customRuntimeMain = function () {
var path = NativeModule.require('path');
var custom = path.resolve(process.cwd(), process.argv[0] + ".js");
if (!path.existsSync(custom)) return;
process.argv[1] = custom;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment