chore: Force users to set ENCRYPTION_KEY env variable

This commit is contained in:
Faruk AYDIN
2021-11-29 12:02:38 +01:00
committed by Ömer Faruk Aydın
parent 79b12ac9e6
commit d8c216d8c8

View File

@@ -32,6 +32,10 @@ const appConfig: AppConfig = {
encryptionKey: process.env.ENCRYPTION_KEY
}
if(!appConfig.encryptionKey) {
throw new Error('ENCRYPTION_KEY environment variable needs to be set!');
}
const baseUrl = `${appConfig.protocol}://${appConfig.host}:${appConfig.port}`;
appConfig.baseUrl = baseUrl;