Skip to content

Added .env support #21

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added .env support #21

wants to merge 1 commit into from

Conversation

pandfun
Copy link

@pandfun pandfun commented Oct 11, 2023

What does this PR do?

Add support to .env files.

Test Plan

  1. Installed the dot-env npm package
  2. Created a .env.example to show users how to use it.
  3. Updated app.js to fetch the api key, project id, etc using the .env file.
  4. Added .env to .gitignore.
  5. Updated README.md to reflect the new installation steps.

Related PRs and Issues

Closes: #14

Have you read the Contributing Guidelines on issues?

Yes

@mountainash
Copy link

I would suggest not using dot-env - it's an unneeded dependency. Node.JS has builtin .env support for some time now*... ref: https://nodejs.org/en/learn/command-line/how-to-read-environment-variables-from-nodejs

  • Node.JS v20 released 18 Apr 2023

@mountainash
Copy link

docker-compose.yml should also be updated to ensure that the .env file is used.

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

Successfully merging this pull request may close these issues.

Use environment variables for API KEY and PROJECT ID
2 participants