Created
March 5, 2012 21:33
-
-
Save efeminella/1981238 to your computer and use it in GitHub Desktop.
Launch a file in a browser from node.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For example, launches 'app/index.html' : launch('app/index.html'); | |
var launch = function(path) { | |
require('child_process' ).spawn('open', [path]); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment