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
Project ID:
5e37d59f-6983-4df8-b137-bbe6079c9e0b
5e37d59f-6983-4df8-b137-bbe6079c9e0b
you are trying to connect to localhost
do i need to check at it from this possition
or do i need to check it from the application.propeties
front your frontend you need to make requests to your backend railway domain
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
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
im using VUE 3 as frotend framework
what bundler? vite?
i think CLI the normale one
the basic
nuxt? you gotta be more specfic
give me a sec
fun fact, you dont need npx in the script commands, they are already ran with npx by default
owhh okay hahahaha really?
yes, but thats not your issue
true hahahaa
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?
as stated by the docs
this variable would need to be prefixed
owhhh so i need to fix those hmm
@Brody still fixed it like this
cant get a connection
what do you have in .env production
are these .env files making it into your github repo
i dont use github repo but gitlab
so i need to railway link it and up it
manually
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
id think so
i get so much errors also with upping it
thats an issue with your os
have you prefixed this variable
yes i did it based on .env.production
or is this an other thing
i prefixed it here for all the backend connections
show me your railway service variables again
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
my bad my bad
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! 🙂
yea no problem i thank u for everything