#Railway does not resolve custom domain

55 messages · Page 1 of 1 (latest)

vital comet
#

get this when i have setup things correctly

gaunt owlBOT
#

Project ID: N/A

vital comet
#

it should be valid

#

code for server

#

its using railpack for deploy

tribal mesa
vital comet
#

interesting

#

whats the cmd to flush cache

#

this should resolve

tribal mesa
#

depends on your machine

vital comet
#

mac

tribal mesa
#

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

#

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

vital comet
#

just tested on mac

#

first time hitting that url

#

so its not cache

#

its like a wrong setup or smth

#

another mac*

tribal mesa
#

oh that's probably another error

#

im getting a 502 from your application

vital comet
#

does railway supply PORT env

#
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}`)

#

is my server

#

perhaps it overwrites my port

tribal mesa
#

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

#

well try it and lmk

vital comet
#

like this?

#

ok trying

#

lets see

tribal mesa
#

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

#

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

vital comet
#

ok i see

#

it actually manually sets it to 8080

#

ok til

#

im so confused

#

thats with

tribal mesa
#

301 is a redirect

vital comet
#

but i dont have redirect set

tribal mesa
#

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

#

curl does not follow redirects

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

a i see

#

ok this works

#

thank you