Skip to content

Instantly share code, notes, and snippets.

@WesTyler
Created November 1, 2017 20:14
Show Gist options
  • Save WesTyler/6910f2900919804e089796991e100353 to your computer and use it in GitHub Desktop.
Save WesTyler/6910f2900919804e089796991e100353 to your computer and use it in GitHub Desktop.
const webManifest = {
server: {
cache: 'redis',
port: 8000
},
register: {
plugins: [
'./ui-user',
{ plugin: './assets', options: { uglify: true } },
{ plugin: require('./awesome-plugin'), options: { whyNot: true } }
]
}
};
const adminManifest = {
server: {
cache: 'redis',
port: 8001
},
register: {
plugins: [
{ plugin: './assets', options: { uglify: true } },
{ plugin: './ui-admin', options: { sessiontime: 500, routes: { prefix: '/admin' } } },
{ plugin: require('./awesome-plugin'), options: { whyNot: true } }
]
}
};
const options = {
relativeTo: __dirname
};
const webServer = await Glue.compose(webManifest, options);
const adminServer = await Glue.compose(adminManifest, options);
await webServer.start();
console.log('Web server started.');
await adminServer.start();
console.log('Admin server started.');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment