tdoran / PaGiToNi

Home Page:https://pagitoni-news.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

https://pagitoni-news.herokuapp.com/


Languages

Language:JavaScript 70.5%Language:CSS 19.8%Language:HTML 9.7%