A website that shows you today's air pollution level in your selected London borough. Week 5 project.
☁️ Bobby @bobbysebolao ☁️ Anna @tloth ☁️ Ryan @RymaTech ☁️ Banna @bantek89 ☁️
- visit https://co2-much.herokuapp.com/ , or
- set up locally:
- Clone this repo.
- Go to the repo folder
Week5-BARb
. - Run
npm i
to install all the packages used. - Run
npm start
to run the server. - Visit
localhost:4000
in your browser - you're set up!
- Javascript
- Node.js
- request
- Heroku
We used KCL's London Air API: https://www.londonair.org.uk/LondonAir/API/.
✔️ 1. Use at least 1 API
✔️ 2. Make your API calls from the back-end using the Request module (or one you build yourself)
✔️ 3. Your server should contain a minimum of 2 routes
-
We expect to see lots of tests! Modularise your code and test all your pure functions. Write tests for as much of your back-end and front-end logic as you can. We don't expect tests on the DOM.
-
Test your server routes by injecting fake HTTP requests using Supertest (including testing for 404's). Note - you are not required to test any server route that makes an API call, as this will make the test impure (a test that depends on an external factor is not reliable)
✔️ 6. Host your project on Heroku, see resources
✔️ 7. Use module.exports and require to break a single large server file into smaller modules.
✔️ 8. Consider a good server file structure based on what we have discussed over the week.
-
Employ continuous integration on your project with Travis or a similar tool. (If you decide to use Travis, we strongly recommend that you host this project in your own repo rather than in your cohort's FAC repository to avoid all builds getting queued together)
-
Use CodeCov or a similar tool to report and track test coverage.
✔️ ish 11. Include Error Handling.
-
Include a user input field on your web app and include server-side validation to protect your server from potentially malicious user input.
-
Display continuous integration and code coverage badges on your project README.