simple-ssr
Universal server-side rendering implementation for Node.js
Last updated 6 months ago by kirlovon .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install simple-ssr 
SYNC missed versions from official npm registry.

License Last commit NPM version Types

What is it?

Universal server-side rendering implementation for Node.js. Powered by Puppeteer.
This library allows you to preload your web applications on the server side, and send rendered data to the user.

Note: The minimum supported Node version is Node 7.x
Note 2: If you use TypeScript, you must enable esModuleInterop inside tsconfig

Features

  • Simplifies crawlers work with your Single Page Applications or Progressive Web Apps.
  • Preload your web applications on the server-side.
  • Allows you to cache data, optimizing the server-side rendering process.
  • In some cases improves performance and loading speed of your web app.
  • TypeScript support.

Installation

Installation from the NPM repository:

npm install simple-ssr --save

Usage

API Documentation

Example

const express = require('express');
const simpleSSR = require('simple-ssr');
const app = express();

app.get('/', async (req, res) => {
	let rendered = await simpleSSR.render('http://example.com/');
	res.send(rendered.html);
});

simpleSSR.start().then(() => {
	app.listen(3000);
});

Current Tags

  • 1.5.0                                ...           latest (6 months ago)

7 Versions

  • 1.5.0                                ...           6 months ago
  • 1.4.7                                ...           6 months ago
  • 1.4.6                                ...           6 months ago
  • 1.4.5                                ...           8 months ago
  • 1.4.0                                ...           9 months ago
  • 1.3.0                                ...           9 months ago
  • 1.2.5                                ...           10 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 9
Last Day 0
Last Week 2
Last Month 0
Dependencies (2)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |