# Get TDD

In a world where APIs rule the web and JavaScript is the language that reigns across all the stacks, one framework shall rise to challenge the Kingdom of Express.

## Introduction

[Fastify](https://www.fastify.io/), first of its name, is a low overhead (aka. fast) server-side JavaScript framework. Express is currently the most popular NodeJs framework and Fastify is compatible with Express. What makes Fastify a beauty 🌸 is that it's [faster](https://www.fastify.io/benchmarks/), has more [features](https://www.fastify.io/docs/latest/Guides/Getting-Started/) and makes [testing](https://www.fastify.io/docs/latest/Guides/Testing/) our APIs so easy.

What we are going to build together is a simple Calculator API. When we POST an array of numbers e.g. `[2, 4]` our API will add them together and return `6`. It's simple so we keep our attention on testing.

## Test-Driven 🚘

Test-Driven Development is a programming practice where:

- Tests are written before operational code
- Operational Code is updated to make the tests pass
- Code is refactored to improve its design

This is commonly known as Red, Green and Refactor. It reminds me of traffic lights 🚥. 

## Plan

The plan is that I will create a blank repo and open PR's so you can see how we can evolve an API using tests.

If you would like to skip ahead, take a look at this [Github repository](https://github.com/iampeterbanjo/get-tdd).

See you soon. 

✌️




 
