Skip to content

Founders & Coders Week 5: Node Project with Ryan, Anna, Bobby and Banna.

Notifications You must be signed in to change notification settings

rymatech/FAC-Week5-Project-Node

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CO2-MUCH

A website that shows you today's air pollution level in your selected London borough. Week 5 project.

🐱 TEAM

☁️ Bobby @bobbysebolao ☁️ Anna @tloth ☁️ Ryan @RymaTech ☁️ Banna @bantek89 ☁️

🐶 SET-UP

  1. Clone this repo.
  2. Go to the repo folder Week5-BARb.
  3. Run npm i to install all the packages used.
  4. Run npm start to run the server.
  5. Visit localhost:4000 in your browser - you're set up!

🔨 BUILT WITH

  • Javascript
  • Node.js
    • request
  • Heroku

😠 API

We used KCL's London Air API: https://www.londonair.org.uk/LondonAir/API/.

🦜 ORIGINAL IDEAS

ideas

😴 GOALS

todo

todo2

✔️ 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

  1. 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.

  2. 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.

  1. 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)

  2. Use CodeCov or a similar tool to report and track test coverage.

✔️ ish 11. Include Error Handling.

  1. Include a user input field on your web app and include server-side validation to protect your server from potentially malicious user input.

  2. Display continuous integration and code coverage badges on your project README.

👧 USER JOURNEYS

user journey og

user journey1

user journey2

🎓 Things that we learned

There's no line of code too small to console.log()

How the backend passes API responses to the front end (using the request module)

You can't use .map() to parse a set of nested objects

:sad: Things that we struggled with

Naming variables!

Understanding what is going in/coming out of our handler functions

screm

About

Founders & Coders Week 5: Node Project with Ryan, Anna, Bobby and Banna.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 65.2%
  • JavaScript 26.2%
  • CSS 8.6%