Skip to content

si-harps/hellobot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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' })

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published