a year ago
get this when i have setup things correctly
54 Replies
a year ago

a year ago
it should be valid
a year ago
code for server
a year ago
its using railpack for deploy
a year ago
it may be a DNS cache on our end, the custom domin is already working here
a year ago

a year ago
interesting
a year ago
whats the cmd to flush cache
a year ago

a year ago
this should resolve
a year ago
depends on your machine
a year ago
mac
a year ago
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
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
a year ago

a year ago
just tested on mac
a year ago
first time hitting that url
a year ago
so its not cache
a year ago
its like a wrong setup or smth
a year ago
another mac*
a year ago
oh that's probably another error
a year ago
im getting a 502 from your application

a year ago
make sure to follow this doc
https://docs.railway.com/reference/errors/application-failed-to-respond
a year ago
does railway supply PORT env
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}`)a year ago
is my server
a year ago

a year ago
perhaps it overwrites my port
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
a year ago
well try it and lmk
a year ago

a year ago
like this?
a year ago
ok trying
a year ago
lets see
a year ago
maybe try to set the env variable "PORT" to 4000? on railway
a year ago
railway won't override the port variable if the user provides one manually
a year ago
ok i see
a year ago

a year ago
it actually manually sets it to 8080
a year ago
ok til
a year ago

a year ago
im so confused
a year ago
thats with
a year ago

a year ago
301 is a redirect
a year ago
but i dont have redirect set
a year ago
you probably tried to reach on http and got redirect to https
a year ago
curl does not follow redirects
a year ago
❯ curl -X GET 'https://api-ts-elysia.nikiv.dev'
test⏎a year ago
a i see
a year ago
ok this works
a year ago
thank you
a year ago
np