Glimpse/StickerApp

Monolith: Refactor configuration to support Azure App Service deployment

Closed this issue · 3 comments

The configuration for the app today assumes that the mongodb url is always "localhost" refer to mongodb.js:

const url = 'mongodb://localhost:${mongoConfig.port}/${mongoConfig.dbName}';

Instead, this needs to be configurable to either use localhost or the deployed connection string for the db. To fix this, we need to introduce support for a NODE_ENV envrionment variable that is set to "development" or "production" that can be used at runtime to control the desired configuration and connection string.

Estimate: 1-2 days

It would be great if we added support for looking for a MONGO_URL env var (or equivalent), without needing to worry about the NODE_ENV var.

I like the MONGO_URL idea; seems like the most flexible option.

Closing - we will only focus on the microservice version; the existing TODO MEAN app will cover the app service\Linux deployment.