Day 2: API Foundations

Joe Mainwaring - Jan 2 '22 - - Dev Community

After scaffolding the project on Day 1, it's now time to start building out an application. Today's work encompassed getting a functional foundation for the API in place, that way I can focus on building the endpoints related to the actual feature in future days.

Progress Summary

  • Installed Express, Body Parser, Compression, Cors, Express Request ID, and Morgan for the foundation of the API.
  • Installed Convict & wrote a configuration file with default values and environment variable mappings.
  • Installed Winston & implemented a customized logger.
  • Implemented a .well-known/ endpoint that describes the state of the API.
  • Installed Git Rev Sync to provide local values for the current git commit and branch, which will be included in the well-known endpoint.
  • Added an npm script start:api to launch the API.

Accessing the API from the browser

Interested in seeing the code changes? Check out the diff by reviewing this Pull Request for Day 2.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player