Skip to content

Instantly share code, notes, and snippets.

@kerren
Created March 21, 2021 21:44
Show Gist options
  • Save kerren/3f7192abf91c78b4c3e8e8312fe8fb57 to your computer and use it in GitHub Desktop.
Save kerren/3f7192abf91c78b4c3e8e8312fe8fb57 to your computer and use it in GitHub Desktop.
[Importing the config] A few ways to do it #config #import #nestjs
// 1. Import the full config object
import { Config } from '@config';
console.log(Config.database);
// 2. Import a single "feature"
import { database } from '@config';
// 3. Import the full config but as a namespace
import * as config from '@config';
console.log(config.database);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment