Serve data to clients from a server
November 10, 2017
Discuss MVC and related Architectural Patterns
November 21, 2017
 

Identify and use libraries for software projects

 

Friday, November 17th, 2017

Identify and use libraries for software projects

For this example we will be looking at Kelsey’s Galvanize Games, she used express, path, serve-favicon, morgan, cookie-parser, body-parser, method-override, dotenv, hbs, knex, and pg.

URL: https://warm-lowlands-70510.herokuapp.com

REPO: https://github.com/kalaver8/galvanize-games

  • express – is the server framework that allows us to do simple routing and support for connecting middleware.
  • path – module providing utilities to set file and directory paths.
  • serve-favicon – middleware for serving a favicon.
  • morgan –  is used for logging request details.
  • cookie-parser – parse cookie header and populate req.cookies with an object keyed by the cookie names. Optionally you may enable signed cookie support by passing a secret string, which assigns req.secret so it may be used by other middleware.
  • body-parser – parses request bodies and in this repos case it parses the data into json. This is needed so that we will have manipulatable data when we make a call to our database in a json format.
  • dotenv – stores configuration in the environment separate from code. this is necessary to seperate how the code runs when not run locally using the specified variables put into dotenv.
  • hbs – is the view engine to display data, this allows us to use html syntax like normal to structure the layout of UI
  • knex – is the SQL query builder that allows easy communication between expresss and our db.
  • method-override allows us to use PUT, PATCH, DELETE so that we can do more than just GET and POST
  • pg – is the relational database used to store and manipulate the data tables.