0.3.4 • Published 5 years ago

@ssr-coin/hapi v0.3.4

Weekly downloads
3
License
-
Repository
github
Last release
5 years ago

ssr-coin + Hapi = :heart:

@ssr-coin/hapi

Use ssr-coin with Hapi.

Usage

Install @ssr-coin/hapi.

$ npm install @ssr-coin/hapi

The plugin is automatically loaded and a Hapi plugin is now available at require('ssr-coin').hapi.

Example

// ./example/server.js

const Hapi = require('hapi');
const ssr = require('ssr-coin');

startServer();

async function startServer() {
  const server = Hapi.Server({
    port: process.env.PORT || 3000,
    debug: {request: ['internal']},
  });

  await server.register(ssr.hapi);

  await server.start();

  console.log('Server running');
}