Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standalone usage #443

Open
1 of 4 tasks
pedrolcn opened this issue Aug 2, 2021 · 0 comments
Open
1 of 4 tasks

Standalone usage #443

pedrolcn opened this issue Aug 2, 2021 · 0 comments

Comments

@pedrolcn
Copy link

pedrolcn commented Aug 2, 2021

Issue type:

  • question
  • bug report
  • feature request
  • documentation issue

nestjs-config version
1.0.1

@nestjs/common+core or other package versions

  • @nestjs/common: 7.6.15
  • @nestjs/core: 4.5.7

Is is possible to use this lib in a standalone fashion ? eg: one not tied to nest.js at all.

My use case is that I am using mikro-orm (which provides a really nice integration with nest.js btw). It has a cli tool which can be configured via a .js file exporting an object containing the config object. Right now the config is mostly hard-coded, but I would like to use nestjs/config to load envs from a .env file and populate the config object to be exported from this script.

I know it is really simple to do this using dotenv, but I would really like to be able to have a single way of loading envs in my application, so is it possible to use this lib in a standalone manner as described above ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant