R
Railway•2y ago
ysawyers

Deploying with Vite?

Okay so here's my issue. Because I'm deploying with vite Solid.js docs say to replace the start with the following command
"start": "npx http-server"
"start": "npx http-server"
Everything works well! But when I try to refresh the page it gives me a 404 not found error. after some more digging I found that I should also pass in a proxy flag so all the requests are routed properly and that doesn't happen.
"start": "npx http-server ./dist --port 8080 -P http://localhost:8080?"
"start": "npx http-server ./dist --port 8080 -P http://localhost:8080?"
Now it's working great locally but on Railway this not only doesn't work but I can't access my site anymore. It gives me the error "application has failed to respond." Now it makes sense because the url provided is http and not https but to make it https I have to pass in a -C flag with my cert.pem file which I obviously don't have access to. Bottom line I'm extremely confused and I was just wondering if anyone has deployed with Vite or better yet Solid.js on this platform and if so what steps did you take to make it work? Any help will be appreciated lol I spent all day trying to figure this out T-T
8 Replies
Percy
Percy•2y ago
Project ID: fb5315d1-2b7d-476e-9138-0f3f65a279b3
ysawyers
ysawyersOP•2y ago
fb5315d1-2b7d-476e-9138-0f3f65a279b3
Brody
Brody•2y ago
it has a little mention about applying the guide to vite too
Brody
Brody•2y ago
ysawyers
ysawyersOP•2y ago
i want to cry bro thank you so much you are quite literally a godsend I hope you have a fantastic night or day wherever you are
Brody
Brody•2y ago
thank you 🙂 (night)
Want results from more Discord servers?
Add your server