Kenny
Kenny
Explore posts from servers
RRailway
Created by Kenny on 9/24/2023 in #✋|help
Unable to load env from service variables
Thank you for helping me @Morpheus
56 replies
RRailway
Created by Kenny on 9/24/2023 in #✋|help
Unable to load env from service variables
I solved it. It was a mixture of both user error (my part) and railway I would say. On vercel when you paste a env variable. You get both the name and value pasted. I thought it was the same here (see screen recording). It did work at first I thought but as i started to look closer I realized, my env was being cut. My connection string left out ?retryWrites=true&w=majority when I pasted in my env variable
56 replies
RRailway
Created by Kenny on 9/24/2023 in #✋|help
Unable to load env from service variables
Worked on both
56 replies
RRailway
Created by Kenny on 9/24/2023 in #✋|help
Unable to load env from service variables
Yeah, hardcoding the connection string worked. So i'm really confused where it went wrong tbh
56 replies
RRailway
Created by Kenny on 9/24/2023 in #✋|help
Unable to load env from service variables
Yes. It's very weird. I need to go and research why mongoose is not working as it should
56 replies
RRailway
Created by Kenny on 9/24/2023 in #✋|help
Unable to load env from service variables
It did not work. I tried to log the values as you suggested to check if it was on railway's side. And it turns out the values are printed correctly. But somehow it's not being captured by the MongooseModule
56 replies
RRailway
Created by Kenny on 9/24/2023 in #✋|help
Unable to load env from service variables
No description
56 replies
RRailway
Created by Kenny on 9/24/2023 in #✋|help
Unable to load env from service variables
No description
56 replies
RRailway
Created by Kenny on 9/24/2023 in #✋|help
Unable to load env from service variables
Yes. So I have a .env.local file that i use to load in my variables locally. On railway I assumed that I needed to use the service variable. So i added my env variable manually - MONGODB_URI=MY_URI_STRING
56 replies
RRailway
Created by Kenny on 9/24/2023 in #✋|help
Unable to load env from service variables
0773ce81-f420-464d-9070-125dbbfff019
56 replies