0.5.13 • Published 3 years ago
@goldpage/hapi v0.5.13
Goldpage + Hapi = :heart:
@goldpage/hapi
Use Goldpage with Hapi.
Usage
Install @goldpage/hapi
.
$ npm install @goldpage/hapi
The plugin is automatically loaded and
a Hapi plugin is now available at require('goldpage').hapi
.
Example
// ./example/server.js
const Hapi = require('hapi');
const ssr = require('goldpage');
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');
}