add route for env.js

This commit is contained in:
Rajat Soni
2019-09-09 19:10:01 +05:30
parent 2b5d07c3c2
commit 71cfbea22d

View File

@@ -20,6 +20,10 @@ child_process.execSync('react-env', {
app.use(express.static(path.join(__dirname, 'build')));
app.get('/env.js', function (req, res) {
res.sendFile(path.join(__dirname, 'public', 'env.js'));
});
app.get('/*', function (req, res) {
res.sendFile(path.join(__dirname, 'build', 'index.html'));
});