开发者

How to execute a JavaScript application on the server?

I want to execute a JavaScript application on the server as a service. This application is available at http://prettydiff.com/prettydiff.js

This application is completely independent and separated from the DOM and makes no transmission requests so I don't need anything related to AJAX or DOM integration. This application requires input using function arguments, of which two of the arguments may receive input up to 2mb in size. Because the application is designed to receive large input the application must be executed directly from a receiving application so variables can be passed in and not from escaping literals to the command line. I thinking the application should receive data via HTTP post submissions to an API so that large data can be passed to the server.

I have been investigating Node.js and a couple other server side JavaScript solutions, but most of them seem more focused on using JavaScript to write service instructions instead of 开发者_如何转开发actually executing JavaScript functions or taking data input from HTTP post submissions.

How can I execute my JavaScript application on the server by passing large input into it?


Try this solution:

http://metoojava.wordpress.com/2010/06/20/execute-javascript-from-java/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜