Backend not connected to Frontend deployment

idk what seems to be the problem but i cant find in VUE why its connecting i maked a extra service variable but idk
44 Replies
Percy
Percy•2y ago
Project ID: 5e37d59f-6983-4df8-b137-bbe6079c9e0b
TheDoomedChicken
TheDoomedChickenOP•2y ago
5e37d59f-6983-4df8-b137-bbe6079c9e0b
Brody
Brody•2y ago
you are trying to connect to localhost
TheDoomedChicken
TheDoomedChickenOP•2y ago
do i need to check at it from this possition
TheDoomedChicken
TheDoomedChickenOP•2y ago
or do i need to check it from the application.propeties
Brody
Brody•2y ago
front your frontend you need to make requests to your backend railway domain
TheDoomedChicken
TheDoomedChickenOP•2y ago
i was looking for the problem there but cant find it i maked the variable in railwayy app that connect the procces.env with the API backend but stil it searching localhost
Brody
Brody•2y ago
don't environment variables for the frontend need to be prefixed with something in order for them to be built into the frontend, or else the variable defaults to undefined, and thats probably causing the frontend to fallback to using the localhost address whats your frontend framework
TheDoomedChicken
TheDoomedChickenOP•2y ago
im using VUE 3 as frotend framework
Brody
Brody•2y ago
what bundler? vite?
TheDoomedChicken
TheDoomedChickenOP•2y ago
i think CLI the normale one the basic
Brody
Brody•2y ago
nuxt? you gotta be more specfic
TheDoomedChicken
TheDoomedChickenOP•2y ago
give me a sec
TheDoomedChicken
TheDoomedChickenOP•2y ago
Brody
Brody•2y ago
fun fact, you dont need npx in the script commands, they are already ran with npx by default
TheDoomedChicken
TheDoomedChickenOP•2y ago
owhh okay hahahaha really?
Brody
Brody•2y ago
yes, but thats not your issue
TheDoomedChicken
TheDoomedChickenOP•2y ago
true hahahaa
TheDoomedChicken
TheDoomedChickenOP•2y ago
TheDoomedChicken
TheDoomedChickenOP•2y ago
i removed these 2 NODE_ENV=production VUE_APP_API_URL=ws://ewa-be-app-production-production.up.railway.app No newline at end of file NODE_ENV=development VUE_APP_API_URL= ws://localhost:8081 maybe because of this?
Brody
Brody•2y ago
as stated by the docs
Brody
Brody•2y ago
this variable would need to be prefixed
TheDoomedChicken
TheDoomedChickenOP•2y ago
owhhh so i need to fix those hmm
TheDoomedChicken
TheDoomedChickenOP•2y ago
TheDoomedChicken
TheDoomedChickenOP•2y ago
TheDoomedChicken
TheDoomedChickenOP•2y ago
@Brody still fixed it like this cant get a connection
Brody
Brody•2y ago
what do you have in .env production
TheDoomedChicken
TheDoomedChickenOP•2y ago
Brody
Brody•2y ago
are these .env files making it into your github repo
TheDoomedChicken
TheDoomedChickenOP•2y ago
i dont use github repo but gitlab so i need to railway link it and up it manually
Brody
Brody•2y ago
you wouldnt need to railway link every time, but okay my question still remains the same, is the .env.production file being ignored by the .gitignore rules
TheDoomedChicken
TheDoomedChickenOP•2y ago
id think so
TheDoomedChicken
TheDoomedChickenOP•2y ago
TheDoomedChicken
TheDoomedChickenOP•2y ago
i get so much errors also with upping it
Brody
Brody•2y ago
thats an issue with your os
Brody
Brody•2y ago
have you prefixed this variable
TheDoomedChicken
TheDoomedChickenOP•2y ago
yes i did it based on .env.production or is this an other thing
TheDoomedChicken
TheDoomedChickenOP•2y ago
i prefixed it here for all the backend connections
Brody
Brody•2y ago
show me your railway service variables again
TheDoomedChicken
TheDoomedChickenOP•2y ago
Brody
Brody•2y ago
i asked you if you had prefixed that variable and you said yes, but you have not prefixed that variable it is very hard to help you if i ask you to do something and you just ignore it
TheDoomedChicken
TheDoomedChickenOP•2y ago
my bad my bad
Brody
Brody•2y ago
I don't think my attempts to guide you in the right direction are bearing any fruit. I have other threads from other users to attend to and wish you the best as you debug your issue. Hopefully it gets resolved! 🙂
TheDoomedChicken
TheDoomedChickenOP•2y ago
yea no problem i thank u for everything
Want results from more Discord servers?
Add your server