add code to run javascript files via node or phantomjs