ysawyers
ysawyers
RRailway
Created by ysawyers on 6/2/2023 in #✋|help
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
13 replies