Thinkful-Ed / node-jwt-auth

15 stars 118 forks source link

How is .env being read? #2

Closed MrSkinny closed 6 years ago

MrSkinny commented 6 years ago

@benjaminEwhite @oampo Noticed in the lesson it says you'll need to create .env file for the JWT_SECRET etc. but I'm not seeing how this will be read. Don't you need the dot-env package or similar?

oampo commented 6 years ago

Yep, it's read using dotenv:

https://github.com/Thinkful-Ed/node-jwt-auth/blob/master/package.json#L16 https://github.com/Thinkful-Ed/node-jwt-auth/blob/master/server.js#L1

MrSkinny commented 6 years ago

Ah I was working from @cklanac's fork to review a frontend add for fulltime, which for some reason has lost the dot-env require ...