Using this java project we can write server script in javasctipt with and faster than NodeJs in terms of performance.
Purpose of this project is fast & easy development and better performance than Nodejs. Nodejs is good manny project built using Nodejs, but we knew Nodejs one threaded. Java has manny features and good written library. So main goal of this project is use java + javasctip using cpu utilization , fast ans easy develoment of server side.
- Java
- Windwos, Mac, Linux or Android
- Write server side Javascript (.js) in java resourse
/v8/task
directory. here example Server/res/v8/task/api.js - For Write server fuction we have to start function with
this.
. example test function isthis.test = function(args){...}
- Call function via
AJAX
. for ajax use www/js/server.js.
example of call test function via ajax : index.html
server.ajax({
path: "api.js",
name: "test",
data: {
name: "Pathik"
},
done: function (data) {
console.log(data);
//here data is "Hello Pathik"
}
});
- J2V8 - Java Bindings for V8