#Api getting endpoint
66 messages · Page 1 of 1 (latest)
Project ID: 977d5267-8c30-4ad4-b028-25ad1a926f41
977d5267-8c30-4ad4-b028-25ad1a926f41
as you can see, the program was deployed successfully
I didn’t found solutions yet
are you using process.env.PORT or is 8000 hardcoded?
anything on here stick out? https://docs.railway.app/troubleshoot/fixing-common-errors
the api doesn't return an error explicitly
i setted the env variables
and all run perfect, but for some reason, the GET method doesn't work properly
if i remove the PORT, rocket doesn't know how to respond
I wonder if this is the same as https://canary.discord.com/channels/713503345364697088/1110912233980051508
all of my apps just listen to PORT and they work out of the box, no needing to set it myself.
hmmm
doesn't work
the PORT env setted by railway is ok
but for some reason, if i adjust the ROCKET_ADDRESS to 0.0.0.0 (will use 127.0.0.1 instead) the proyect is builded correctly but doesn't respond
could it because the url that provides railway contains https and in rocket, its setted to http ?
@tall sorrel srry the ping but you know something about this?
maybe i should add CORS?
your app should be listening to http on the PORT and railway will handle all the SSL
my app is listening on PORT already
its unlikely a CORS issue.
do you have a link to your repo you could share?
actually in my .env file, i didn't set any PORT or HOST
I like the readme
Thanks 🤣
for a rocket app, this is correct. whatever you have changed in your variables since this, put this back please
once those two variables are back in tact, show me a screenshot of all your service variables
(I do know what's wrong, but there are steps we have to take to get your app in working condition)
I know
but locally, returns 200 and the json
where is your mongo database hosted
in sao paulo
by who
in a M0 cluster
aws
ah not railway
yeah
okay well then I will leave that up to you, your issues lies with the connection to your database
your api is running and accepting requests just fine
hmmmm
the uri string is correct too
so, for some reason the db cannot execute find_one
how about actually printing the error instead of throwing it away?
that's exactly what im doing rn
lmao
that's its i think
no, isn't work
you'll get to the bottom of this
yes?