15 Replies
Project ID:
6740a982-9486-4b46-9424-8207b2348680
6740a982-9486-4b46-9424-8207b2348680
(Yes I know the passwords are not secure it's just for. auni project)
Okay I've now fixed this issue by deleting adn recreating a database (forwhatever reason this fixed it)
but now I see my service is up and running in deploy logs but I can't access it via http
even tho I created a public domain for it
Does the spring boot deployment have a
PORT
variable in it's environment variables on railway?this is my Dockerfile beware the copies
but do I still need to set the ENV
PORT=8080?
Either that or the http port you've got from exposing the app
will try adn report back thx
redeploying with var just broke it becasue of database already exists .... now I removed the dtabase config in spring taht creates the databse if not existatn and NOW IT WORKS
THANKS
❤️
Do you think it is possible to use ddl auto mode to create the tables or is taht a bad idea>?
If you're using hibernate, you can set it to automatically create or update your tables for you
I've got my own spring instance running with that setting and encountered no issues
I though so too
that should do the trick right?
Yes, i think that is correct
Don't forget to update your database password!
haha will do
but for now I wanna get it working
//
interesting
I tried it out locally now to access
I know insecurenagain but I think I'm already allowing all remotes in my spring application how can CORS still be an isseu?
When sending data from your local machine CORS usually steps in. Try sending a request through a service like postman
This is the response i got from postman by sending a request to your api, no cors error!
Yes I tried that alrady from http file
and works like a charm
idk what's going on tbh
also tried changing proxyconf inn angular
When I deploy the frontne dI get invalid host header any ideas?
Unfortunately not. Perhaps someone else here does though
ah fixed it with --disable-host-check
bt cors issue still here
hmm
if using internal url do I need to change anything else?
Request URL:
https://myservice.up.railway.app/tiss-time-myservice.railway.internal/api/v1/register
Request Method:
POST
this changed the request url to this for some reason
this is my proxyconf