Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

hellobot

1.2.3 • Public • Published

Hellobot

A friendly javascript pre-rendering engine - BETA (UNSTABLE)

npm install hellobot

Introduction

Pre-render your javascript pages on the fly for improved SEO.

Usage

This module contains 2 main entry points, the converter and the client...

The Converter

The converter is responsible for converting and responding with pre-renderdered HTML based on a url passed as a parameter.

var Hellobot = require('hellobot').server;
var hellobot = new Hellobot();
 
hellobot.req({ location: 'https://www.example.com/blog' })

The Client

If required, the client requests HTML from the converter, supplying a request endpoint.

const app = require('koa')();
 
var Hellobot = require('hellobot').client;
var hellobot = new Hellobot({ 
    converter: 'https://my-rest-endpoint.com/render',
});
app.use(hellobot.koa());
 
// Express coming soon

Caching the results

Supply an initialized redis client to persist HTML to cache for blazing fast loadspeed.

var redis = { ...my-redis-instance };
 
var Hellobot = require('hellobot').server;
var hellobot = new Hellobot({ 
    client: redis 
});
 
hellobot.req({ location: 'https://www.example.com/blog' })

Install

npm i hellobot

DownloadsWeekly Downloads

10

Version

1.2.3

License

MIT

Unpacked Size

7.65 kB

Total Files

6

Last publish

Collaborators

  • avatar