fix path to static html

This commit is contained in:
Chika 2020-12-15 14:00:37 +03:00
parent a96014ddb7
commit effc67e433

View File

@ -44,9 +44,10 @@ app.use('/', routes);
/**CLIENT */
if (!isDevelopmentMode) {
app.use(express.static(path.resolve('build')));
const root_dir = path.resolve('build');
app.use(express.static(root_dir));
app.get('*', function (req, res) {
res.sendFile('index.html');
res.sendFile('index.html', { root: root_dir });
});
}
/**CLIENT */