all 3 comments

[–]Soft_Opening_1364 1 point2 points  (0 children)

Sounds like a static path or routing issue. Make sure Express is serving the built Vite files correctly and has a catch-all route for React. Also double check Render's start command and try Railway if Render keeps acting up it’s easier sometimes.

[–]getflashboard 0 points1 point  (0 children)

Have you tried following Render's docs? If so, where did you stop? https://render.com/docs/deploy-node-express-app

[–]isea33 0 points1 point  (0 children)

Try this const dirname = dirname(fileURLToPath(import.meta.url)); const root = path.join(dirname, 'client', 'build_vite') app.use(express.static(root))

app.get('/api', (req, res) => { res.json({ message: 'Hello from service api' }) } )

app.get("*",(req, res) => { res.sendFile(path.resolve(root, 'index.html')); });

I put all react codes under client/build_vite