h5

Distributed computing with JSON.

Usage no npm install needed!

<script type="module">
  import h5 from 'https://cdn.skypack.dev/h5';
</script>

README

h5js

Distributed computing with JSON.

Checkout example.js and cloud.js in examples directory.

var h5 = require('h5');

require('./functions.js');

var example =
  h5.action('http.request', { url: 'http://www.imdb.com/title/tt0110912/' }).
     action('html.extract', { selectors: { title: 'h1.header > span[itemprop="name"]', year: 'h1.header > span > a' } });

example.
  run().
  then(function(result) {
    console.log(result);
  }, function(err) {
    console.log('Error:', err);
  });

Saving action and running in cloud

h5.cloud.set('http://127.0.0.1:6090/');

example.
  save().
  then(function() {
    example.
      run({url: 'http://www.imdb.com/title/tt0137523/'}, true).
      then(function(result) {
        console.log(result);
      }, function(err) {
        console.log('Error:', err);
      });
  });