Reputation: 7647
How to expose a javascript logic which is currently there in a legacy system as a webservice? Only way to do this is convert javascipt code to a another language right? Im finiding a way of expose the javascript code directly as a webservice because it has thousand of codes. So convert those to a java or other language is a huge effort.
Upvotes: 0
Views: 160
Reputation: 943537
You need to put some sort of wrapper around the JS that can take input and output via HTTP and call the appropriate JS functions.
You could write the entire thing using node.js or you could use another language which has an interface to a JS engine such as Perl or Java.
Upvotes: 3