Hey guys! Recently starting picking up node and have been having some trouble trying to get Knex to recognize my .env variables. If it helps, I'm using the dotenv package.Anyway, I defined my db vars inside the .env in root file directory. The vars are working when used in server configuration, but knexfile.js doesn't seem to recognize them. Any ideas on why, or if this is even possible? host : process.env.DB_HOST, user : process.env.DB_USER, password : process.env.DB_PASS, database : process.env.DB_NAME ^ those are the variables I'm assigning within the knexfile(for reference).The help will be much appreciated!
Submitted August 03, 2017 at 07:23AM by Ch0chi
No comments:
Post a Comment