serve express
This commit is contained in:
parent
e92ae9de5b
commit
0ea288bd21
1 changed files with 0 additions and 2 deletions
|
|
@ -3,10 +3,8 @@ const path = require('path');
|
|||
const app = express();
|
||||
const PORT = process.env.PORT || 3888;
|
||||
|
||||
// Serve static files from the React build
|
||||
app.use(express.static(path.join(__dirname, 'build')));
|
||||
|
||||
// Serve index.html for all routes to support client-side routing
|
||||
app.get('*', (req, res) => {
|
||||
res.sendFile(path.join(__dirname, 'build', 'index.html'));
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue