Is it possible to include and use external scripts, such as dygraphs and Canvas2Image in node.js?
I have a php script that normaly draws data in dygraphs and then makes dataURL, calls another php script (ajax) that saves the images into a pdf. And I'm looking for a way that this can be done automatically, without a browser, but with cron instead (Ubuntu server). I know, I can replace dygraphs with PHPlot but if there's a way of doing the javascript (dygraphs, jquery and canvas2image) without the browser (on the server) that would be the preferred way.
I found some resources: external scripts and jquery
but I'm really new to node.js and I don't understand, how to use standard javascript(dygraphs and canvas2image, especially with html and getElementById())
I also stumbled across: PECL and spidermonkey - link - is this better for this?