diff --git a/backend/index.js b/backend/index.js index 2eb16da..890549a 100644 --- a/backend/index.js +++ b/backend/index.js @@ -95,4 +95,10 @@ app.post("/payforalert", function(request, response) { }); }); + +// Anything that doesn't match the above, send back index.html +app.get('*', (req, res) => { + res.sendFile(path.join(__dirname + '/../frontend-react/build/index.html')) +}) + app.listen(port, () => console.log(`Example app listening on port ${port}!`)); diff --git a/package.json b/package.json index b273ddb..2b5e24d 100644 --- a/package.json +++ b/package.json @@ -16,12 +16,10 @@ "node": "11.10.x" }, "dependencies": { - "2checkout-node": "0.0.1", - "@sendgrid/mail": "^6.3.1", - "cheerio": "^1.0.0-rc.2", - "express": "^4.16.4", - "mysql2": "^1.6.4", - "node-fetch": "^2.3.0", - "sequelize": "^4.42.0" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "start": "node ./backend/index.js", + "heroku-postbuild": "cd frontend-react && npm install && npm run build && cd .. && cd backend && npm install" } }