mirror of
https://github.com/mjrode/WhatToWatch.git
synced 2025-12-30 10:09:44 -06:00
Correct path to build/html to fix routing issue
This commit is contained in:
@@ -44,6 +44,7 @@ class MediaCard extends Component {
|
||||
<i className="material-icons left">live_tv</i>Similar
|
||||
Shows
|
||||
</Link>
|
||||
{show.views} Views
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -45,9 +45,8 @@ export default () => {
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
server.use(express.static('client/build'));
|
||||
const path = require('path');
|
||||
server.get('*', (req, res) => {
|
||||
res.sendFile(path.resolve(__dirname, 'client', 'build', 'index.html'));
|
||||
res.sendFile('../client/build/index.html');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user