Railway does not resolve custom domain
nikiv
HOBBYOP

a year ago

get this when i have setup things correctly

54 Replies

nikiv
HOBBYOP

a year ago

1348038456269607000


nikiv
HOBBYOP

a year ago

it should be valid



nikiv
HOBBYOP

a year ago

code for server


nikiv
HOBBYOP

a year ago

its using railpack for deploy


passos
MODERATOR

a year ago

it may be a DNS cache on our end, the custom domin is already working here


passos
MODERATOR

a year ago

1348039490555482000


nikiv
HOBBYOP

a year ago

interesting


nikiv
HOBBYOP

a year ago

whats the cmd to flush cache


nikiv
HOBBYOP

a year ago

1348039594561638400


nikiv
HOBBYOP

a year ago

this should resolve


passos
MODERATOR

a year ago

depends on your machine


nikiv
HOBBYOP

a year ago

mac


passos
MODERATOR

a year ago

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder


passos
MODERATOR

a year ago

it might still not work tho, the DNS resolver might be different if your ISP provides one
if it doesn't solve, wait 1-2 hours and it should work


nikiv
HOBBYOP

a year ago

1348040148335722500


nikiv
HOBBYOP

a year ago

just tested on mac


nikiv
HOBBYOP

a year ago

first time hitting that url


nikiv
HOBBYOP

a year ago

so its not cache


nikiv
HOBBYOP

a year ago

its like a wrong setup or smth


nikiv
HOBBYOP

a year ago

another mac*


passos
MODERATOR

a year ago

oh that's probably another error


passos
MODERATOR

a year ago

im getting a 502 from your application

1348040402221006800



nikiv
HOBBYOP

a year ago

does railway supply PORT env


nikiv
HOBBYOP

a year ago

import { Elysia } from "elysia"

const app = new Elysia().get("/", "test").listen(process.env.PORT ?? 4000)

export type App = typeof app
console.log(`Server is running at ${app.server?.hostname}:${app.server?.port}`)

nikiv
HOBBYOP

a year ago

is my server


nikiv
HOBBYOP

a year ago

1348040894460334000


nikiv
HOBBYOP

a year ago

perhaps it overwrites my port


passos
MODERATOR

a year ago

yep railway provides the PORT variable but I don't know if it would provide a random port instead of the defined one


passos
MODERATOR

a year ago

well try it and lmk


nikiv
HOBBYOP

a year ago

1348041437299868000


nikiv
HOBBYOP

a year ago

like this?


nikiv
HOBBYOP

a year ago

ok trying


nikiv
HOBBYOP

a year ago

lets see


passos
MODERATOR

a year ago

maybe try to set the env variable "PORT" to 4000? on railway


passos
MODERATOR

a year ago

railway won't override the port variable if the user provides one manually


nikiv
HOBBYOP

a year ago

ok i see


nikiv
HOBBYOP

a year ago

1348041670406443000


nikiv
HOBBYOP

a year ago

it actually manually sets it to 8080


nikiv
HOBBYOP

a year ago

ok til


nikiv
HOBBYOP

a year ago

1348042040427937800


nikiv
HOBBYOP

a year ago

im so confused


nikiv
HOBBYOP

a year ago

thats with


nikiv
HOBBYOP

a year ago

1348042128776761300


passos
MODERATOR

a year ago

301 is a redirect


nikiv
HOBBYOP

a year ago

but i dont have redirect set


passos
MODERATOR

a year ago

you probably tried to reach on http and got redirect to https


passos
MODERATOR

a year ago

curl does not follow redirects


nikiv
HOBBYOP

a year ago

❯ curl -X GET 'https://api-ts-elysia.nikiv.dev'
test

nikiv
HOBBYOP

a year ago

a i see


nikiv
HOBBYOP

a year ago

ok this works


nikiv
HOBBYOP

a year ago

thank you


passos
MODERATOR

a year ago

np


Loading...