开发者

Run Flot, Javascript on Server?

I would like to use a Javascript library (Flot) to generate charts in my application. Most of the time, the charting will be performed by开发者_JAVA技巧 clients. However, I can see that in some cases, where the same charts would be frequently accessed by all clients, it would be better to generate those charts on the server, cache them, and serve them as images.

How could I go about executing Javascript from a script that runs on the server? Can Flot be used to generate PNG's?


This should be possible with Node.js and node-canvas. Node-Canvas can spit out PNGs for your cached graphs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜