Royal-Family-Kids-Camp-Fargo / RFKCFargo

0 stars 0 forks source link

Refresh on /login page generates a 404 #1

Open booherbg opened 16 hours ago

booherbg commented 16 hours ago

Likely something due to how react-router is set up in production (easy fix, just need to track down)

booherbg commented 13 hours ago

Simple fix in server.js that will re-serve index.html for any otherwise not found URLs (won't generate 404s though which maybe isn't ideal but this works fine for now)

app.get('*', (req, res) => {
  console.log('sending index.html')
  res.sendFile(path.resolve('dist', 'index.html'))
});