Inside the below job.js node script how can i call /getJobs .Am using following way but getting $ is not defined.
job.js
var jobScedule = function (time, jobid) {
var params = {
"id": jobid
};
$.get('/getJobs', params, function (data) {
console.log(data);
});
}
script.js
.......
......
switch(context.pathname) {
case '/getJobs':
testUtils.runTest(context);
break;
}
$.get()looks like a jQuery method. Have you included jQuery?