Skip to content

bartlangelaan/static-prerender-server

Repository files navigation

NPM version Build Status Dependency Status Coverage percentage Greenkeeper badge license

static-prerender-server

Starts a static server with prerender.

Global usage

$ npm install -g static-prerender-server
$ static-prerender-server

Project usage

$ npm install --save static-prerender-server
const server = require('static-prerender-server');
const path = require('path');

server({
  port: 3000,
  prerenderPort: 3002,
  path: path.join(__dirname, 'public'),
  fallbackFile: 'index.html',
  callback: () => console.log('Server online!')
})

// or just run server() with no options

License

MIT © Bart Langelaan