Created
July 10, 2014 16:23
-
-
Save dtothefp/83560408a5c25363fae3 to your computer and use it in GitHub Desktop.
Node Spawn
This file contains hidden or 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
| // node executable file phantom_sample.js | |
| var spawn = require('child_process').spawn; | |
| var phantom = require('phantomjs'); | |
| var excPath = phantom.path; | |
| var path = require('path'); | |
| var args = [ | |
| path.resolve( __dirname, 'phantom_exc.js') | |
| ]; | |
| spawn(excPath, args); | |
| //phantom_exc.js | |
| var system = require('system'); | |
| var webpage = require('webpage'); | |
| console.log(system, webpage); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Give that a try for your node script. :)