Skip to content

fac-13/PaGiToNi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Server API Call Project Build Status

Team PaGiToNi has built a site that allows you to view the latest news from a variety of reputable news sources, and search for news relating to issues of your choice 👍

Completed Key objectives 🏄‍🏄‍🏄‍🏄‍

  • Use at least 1 API
  • Make your API calls from the back-end using the Request module (or one you build yourself)
  • The server contains a minimum of 2 routes
  • Back-end testing with Tape
  • Server testing with Supertest to inject fake HTTP requests
  • Project hosted on Heroku
  • Using module.exports and require to break a single large server file into smaller modules.
  • Employ continuous intergration on your project with Travis or a similar tool (not currently passing..)

Stretch goals still to complete 🙆‍

  • Allow users to search via categories, countries, sources etc.
  • Allow users to scroll across pages to view more than the set amount of news articles

Our journey 🚗

Day One (Tuesday)

  • We used a whiteboard to draw up a basic software architecture
  • We decided on our priorities for this project, namely: a clearly structured, documented API to allow us to focus on back-end requests
  • We mob-programmed the initial setup

Day Two (Wednesday)

  • Splitting into pairs👯‍, we started with:

    1. the first API call and its handler
    2. the xhr to reach the first API's route and handler
  • Reconvening to plan our next steps, we decided on:

    1. beginning work on the second, user-input API call
    2. prepping the front-end to render the response from the first xhr and API

Biggest challenge: Mocking API calls

  • We attempted to test our back-end handlers using nock to mock an external API call. After struggling with it for several hours, we ultimately couldn't get it to work. 😭

Resources

Our initial software architecture plan:

software architecture