Sveltekit app fails to respond
Honestly I'm not entirely sure if I'm doing this correctly, but I've got a SvelteKit app running (works fine locally) on a Railway service -- the build/deploy seem to work fine, but it appears to not be responding when I visit the URL. Would this have something to do with the port? I'm not sure what port to listen on if so
6 Replies
Project ID:
8a22e319-8a06-4810-9e75-4c3b7db0f8e7
You might find these helpful:
- SvelteKit template invalid GitHub URL
- Can't reach my app through the url
- ASP.net 6 Application Error. Port?
β οΈ experimental feature
8a22e319-8a06-4810-9e75-4c3b7db0f8e7
Using
vite preview
for the start
command
Alright well I'm not sure whether or not this was the correct solution, but adding the --host
flag to yarn start
appeared to fix the issue when listening on port 4173. However there's another "issue" now, which is the custom domain doesn't seem to persist on redirect, which I'm not sure whether or not that's the expected behavior
So if the custom domain is www.xyz.com
, and the railway domain is railway.app
, then going to www.xyz.com
does take you to railway.app
, but it changes the domain so it still appears a bit oddHey, so how did you solve this?
npm run start --host might?
It did not, haha π
This was the solution π