|
@@ -35,6 +35,11 @@ const port = Settings.port || Settings.internal.web.port || 3000
|
|
|
const host = Settings.internal.web.host || 'localhost'
|
|
const host = Settings.internal.web.host || 'localhost'
|
|
|
if (!module.parent) {
|
|
if (!module.parent) {
|
|
|
// Called directly
|
|
// Called directly
|
|
|
|
|
+
|
|
|
|
|
+ // We want to make sure that we provided a password through the environment.
|
|
|
|
|
+ if (!process.env['WEB_API_USER'] || !process.env['WEB_API_PASSWORD']) {
|
|
|
|
|
+ throw new Error('No API user and password provided')
|
|
|
|
|
+ }
|
|
|
Server.server.listen(port, host, function() {
|
|
Server.server.listen(port, host, function() {
|
|
|
logger.info(`web starting up, listening on ${host}:${port}`)
|
|
logger.info(`web starting up, listening on ${host}:${port}`)
|
|
|
logger.info(`${require('http').globalAgent.maxSockets} sockets enabled`)
|
|
logger.info(`${require('http').globalAgent.maxSockets} sockets enabled`)
|