Scripts with server-side Javascript

What is a good javascript server-side implementation for writing one-time scripts to handle a task or writing automation scripts that will be used over and over again.

I was intrigued by the ability of SSJS to smooth out web pages with such ease, and I think SSJS can replace Python with my general scripting requirements. Is there an SSJS implementation for such things?

+3
source share
3 answers

If you are familiar with jQuery, node.js (with the query, jsdom, and jquery port plugins) make it easy to clear web pages using jQuery in just a few lines.

:

// Importing required modules
var request = require("request"),
    $ = require("jquery");

request({uri: "http://www.stackoverflow.com/"}, function (err, response, body) {
   $(body).find("#question-mini-list h3 a").each(function () {
      console.log($(this).text());
   });
});

, javascript, MooTools, Prototype - , jsdom node.js( , window, document , jsdom ).

+3

node.js. (, -, ), , , .

+1

Rhino + Quartz

0

Source: https://habr.com/ru/post/1779302/


All Articles