mirror of
https://github.com/IT4Change/gradido.git
synced 2026-01-20 20:01:31 +00:00
add prevention to run production in test-mode
This commit is contained in:
parent
8c38116bde
commit
4f97999195
@ -75,6 +75,13 @@ const createServer = async (
|
||||
logger,
|
||||
})
|
||||
apollo.applyMiddleware({ app, path: '/' })
|
||||
logger.info(
|
||||
`running in environment PRODUCTION = ${CONFIG.PRODUCTION} with TEST_MODUS = ${CONFIG.TEST_MODUS} ...`,
|
||||
)
|
||||
if (CONFIG.PRODUCTION && CONFIG.TEST_MODUS === 'true') {
|
||||
logger.error(`### RUNNING ENVIRONMENT Production IN TEST_MODE IS NOT ALLOWED ###`)
|
||||
throw new Error(`### RUNNING ENVIRONMENT Production IN TEST_MODE IS NOT ALLOWED ###`)
|
||||
}
|
||||
logger.debug('createServer...successful')
|
||||
return { apollo, app, con }
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user