- Install and Run
- Dashboard for Local DynamoDB
- Get Access to Context Object
- Add Environment Variables
- Get Environment Variables
npm install
docker-compose up -d
npm run start:dev
npm run db:local
It's free to inject the Context
object into any layer (controller, service or repo layer). Developer can use this feature for contextual logging. You can also customize the Context
generation logic in src/common/context/context.ts
export class SomeController {
@Inject()
context: Context
}
- add in
.env.local
- set default value in
src/providers/config/derive.ts
- set derived values in
src/providers/config/derive.ts
- add type and validation rules in
src/providers/config/envs.ts
const port = config.get<string>("PORT")
// not recommended, only for rare cases
process.env.PORT