diff --git a/.gitignore b/.gitignore index 8cdbd98..c3a72b4 100644 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,8 @@ venv # Build folder build + +# Elastic Beanstalk Files +.elasticbeanstalk/* +!.elasticbeanstalk/*.cfg.yml +!.elasticbeanstalk/*.global.yml diff --git a/index.js b/index.js new file mode 100644 index 0000000..261b515 --- /dev/null +++ b/index.js @@ -0,0 +1,16 @@ +// ./index.js +const express = require('express') +const path = require('path') +const port = process.env.PORT || 3000 +const app = express() + +// serve static assets normally +app.use(express.static(__dirname + '/public')) + +// Handles all routes so you do not get a not found error +app.get('*', function(request, response) { + response.sendFile(path.resolve(__dirname, 'public', 'index.html')) +}) + +app.listen(port) +console.log("server started on port " + port) \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b3c1b88..8f0146f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14804,14 +14804,13 @@ } }, "react": { - "version": "16.3.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.3.0.tgz", - "integrity": "sha512-Qh35tNbwY8SLFELkN3PCLO16EARV+lgcmNkQnoZXfzAF1ASRpeucZYUwBlBzsRAzTb7KyfBaLQ4/K/DLC6MYeA==", + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react/-/react-16.13.1.tgz", + "integrity": "sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==", "requires": { - "fbjs": "^0.8.16", "loose-envify": "^1.1.0", "object-assign": "^4.1.1", - "prop-types": "^15.6.0" + "prop-types": "^15.6.2" } }, "react-app-polyfill": { diff --git a/package.json b/package.json index 128d312..d2a1f1e 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "chart.js": "^2.9.3", "chartist": "^0.10.1", "classnames": "^2.2.5", + "d3": "^5.16.0", "d3-dsv": "^1.2.0", "d3-format": "^1.4.4", "d3-scale": "^3.2.1", @@ -23,11 +24,11 @@ "npm-run-all": "^4.1.1", "perfect-scrollbar": "^1.3.0", "prop-types": "^15.7.2", - "react": "^16.2.0", + "react": "^16.13.1", "react-autosuggest": "^10.0.0", "react-chartist": "^0.13.1", "react-chartjs-2": "^2.9.0", - "react-dom": "^16.12.0", + "react-dom": "^16.13.1", "react-google-maps": "^9.4.5", "react-router-dom": "^4.2.2", "react-scripts": "^3.3.1", @@ -68,6 +69,7 @@ }, "proxy": "http://localhost:5000", "devDependencies": { + "@types/jest": "^26.0.0", "env-cmd": "^10.1.0" } } diff --git a/src/__tests__/Button.test.js b/src/__tests__/Button.test.js new file mode 100644 index 0000000..7e5ab5f --- /dev/null +++ b/src/__tests__/Button.test.js @@ -0,0 +1,20 @@ +import React from "react"; +import ReactDom from 'react-dom'; +import { Grid } from "material-ui"; +import {ContentCopy, LocalOffer} from "material-ui-icons"; + +import { Button } from "components"; + +describe("Button component", () => { + test('renders without crashing',()=>{ + const div = document.createElement('div'); + ReactDom.render( +