Created
November 1, 2017 20:14
-
-
Save WesTyler/6910f2900919804e089796991e100353 to your computer and use it in GitHub Desktop.
This file contains 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 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