Skip to content

Configuration files example for any typescript project

Notifications You must be signed in to change notification settings

cojack/ts-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ts-config with defaults

Copy and paste src/config, it into your project

Files:

  • src/config/env.def.ts - default values, also have Configure interface that should be populated with properties
  • src/config/env.(dev|stag|prod).ts - for different environment, we might have different configurations
  • src/config/index.ts - combiner & exporter

Deps

  • lodash.defaultsdeep - because of deep assign requirements

Recommendation

I highly recommend to use a dotenv, for crucial data such as credentials, and use the ENVs inside the config.

License

Copyleft

About

Configuration files example for any typescript project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published