Coding task · NestJS course · Module 1: NestJS Basics
Custom Configuration Factory
Create a configuration factory function for ConfigModule.forRoot().
Task
Write and export a databaseConfig constant = registerAs('database', ...), whose factory returns an object { host, port, name } with the values of process.env.DB_HOST, process.env.DB_PORT (converted to a number) and process.env.DB_NAME.