2 years ago
get this when i have setup things correctly
54 Replies
2 years ago

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

2 years ago
interesting
2 years ago
whats the cmd to flush cache
2 years ago

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

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

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

2 years ago
perhaps it overwrites my port
2 years ago
yep railway provides the PORT variable but I don't know if it would provide a random port instead of the defined one
2 years ago
well try it and lmk
2 years ago

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

2 years ago
it actually manually sets it to 8080
2 years ago
ok til
2 years ago

2 years ago
im so confused
2 years ago
thats with
2 years ago

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