-
-
Notifications
You must be signed in to change notification settings - Fork 887
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
Placement of .env file and linkage not working in 2-begin #513
Comments
@AlekseiSaunders Thanks for noting. When you say "root directory", do you mean that your We set up the code to have a |
Ah, gotcha.
I thought 'root' was referring to the /builderbook folder.
Moving it to the associated #-begin does work as expected.
Thanks for the clarification.
Alex
…On Sat, Dec 24, 2022 at 2:13 PM Kelly Burke ***@***.***> wrote:
@AlekseiSaunders <https://github.com/AlekseiSaunders> Thanks for noting.
When you say "root directory", do you mean that your .env file is in the
main builderbook folder, in the builderbook/book folder, or in the
builderbook/book/2-begin (or 2-end) folder?
We set up the code to have a .env file within each of the begin and end
folders. Try putting a copy of your .env file directly in your 2-begin or
2-end folder, then see if require('dotenv').config() works as expected.
—
Reply to this email directly, view it on GitHub
<#513 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ART5OZLZWW6HP43BLGHPXFLWO5RRBANCNFSM6AAAAAATFZOMJQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
*Aleksei (Alex) Saunders*
QA Engineer / Web Developer
m: 303.709.7903
e: a ***@***.***>***@***.***
website: alekseisaunders.com <https://alekseisaunders.com/#>
LinkedIn: https://www.linkedin.com/in/alekseisaunders/
|
You're welcome! |
Using
require('dotenv').config()
as indicated in Chapter-2 did not work for me when .env file was placed in Root directory.Needed to supply path in config() as so:
dotenv.config({ path: '../../.env' });
required dotenv in separate line as so:
const dotenv = require('dotenv');
- although don't know if it is necessary to split this and config.The text was updated successfully, but these errors were encountered: