Created
November 1, 2017 20:03
-
-
Save WesTyler/eee7309476697af5437c7fb94fa36531 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const manifest = { | |
server: { | |
cache: 'redis' | |
}, | |
connections: [ | |
{ | |
port: 8000, | |
labels: ['web'] | |
}, | |
{ | |
port: 8001, | |
labels: ['admin'] | |
} | |
], | |
registrations: [ | |
{ | |
plugin: { | |
register: './assets', | |
options: { | |
uglify: true | |
} | |
} | |
}, | |
{ | |
plugin: './ui-user', | |
options: { | |
select: ['web'] | |
} | |
}, | |
{ | |
plugin: { | |
register: './ui-admin', | |
options: { | |
sessiontime: 500 | |
} | |
}, | |
options: { | |
select: ['admin'], | |
routes: { | |
prefix: '/admin' | |
} | |
} | |
}, | |
{ | |
plugin: { | |
register: require('./awesome-plugin.js'), | |
options: { | |
whyNot: true | |
} | |
} | |
}, | |
] | |
}; | |
const options = { | |
relativeTo: __dirname | |
}; | |
Glue.compose(manifest, options, (err, server) => { | |
if (err) { | |
throw err; | |
} | |
server.start(() => { | |
console.log('hapi days!'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment