DEV Community

Paulo Chaves
Paulo Chaves

Posted on

Starting a REST API with Fastify, Postgres, Docker and Redis

Using this boilerplate from Github to bootstrap your REST API with Node, TypeScript, Fastify, Postgres, Docker, Redis and Swagger.

Consider you have experience and know what you are doing, using a boilerplate like the one mentioned above can be a really good starting point since you may want to focus on the business logic of your application and ship things to production as soon as possible rather than worrying about putting all the pieces together to finally be able to start developing your app.

Disclaimer: I know I could just use a "batteries included" framework to get started with but that is not the goal here.

In my case I was looking for something that included database access, background jobs, caching, testing, logging, linting, typescript, authentication, docker and api documentation. This repository, which is MIT licensed, contains all of this which is great.

——

Fastify is a web framework highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture. It is inspired by Hapi and Express and as far as we know, it is one of the fastest web frameworks in town. (github.com/fastify/fastify)

PostgreSQL is a powerful, open source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance. (Wikipedia)

Redis is a source-available, in-memory storage, used as a distributed, in-memory key–value database, cache and message broker, with optional durability. (Wikipedia)

Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers. The service has both free and premium tiers. The software that hosts the containers is called Docker Engine. It was first released in 2013 and is developed by Docker, Inc. (Wikipedia)

Top comments (0)