Skip to content

Instantly share code, notes, and snippets.

@kerren
Created March 21, 2021 21:17
Show Gist options
  • Save kerren/d6ada0434b3d77a28eee8309457be57e to your computer and use it in GitHub Desktop.
Save kerren/d6ada0434b3d77a28eee8309457be57e to your computer and use it in GitHub Desktop.
[The standard form of the config] How the docs say you should import the config #config #import #standard #nestjs
export default () => ({
port: parseInt(process.env.PORT, 10) || 3000,
database: {
host: process.env.DATABASE_HOST,
port: parseInt(process.env.DATABASE_PORT, 10) || 5432
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment