Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict'
require('./globals')
const Hapi = require('hapi')
const Path = require('path')
const Config = util('config')
const Laabr = require('laabr')
const Inert = require('inert')
const Vision = require('vision')
const Globby = require('globby')
const Handlebars = require('./views')
// configure hapi response logging format
Laabr.format('log', ':time :level :message')
class Bootstrap {
async launchWeb() {
// create new web instance
// add web’s connection information
const web = new Hapi.Server({
host: 'localhost',
port: Config.get('app.port')
})
// register plugins to web instance
await web.register([
Inert,
Vision,
{
plugin: require('hapi-dev-errors'),