Fastify version 4 sample with functional approach
This project is a small but feature complete application build with Fastify, native mongodb driver and papr (typesafe models for mongodb), and it aims to show functional approach, dependency injection and type safe programming.
- Update 2022-07-14 -> This project is pure native ESM! :D
Useful links of libs that we use on this project:
- NeverThrow (avoid throwing exceptions) -> https://github.com/supermacro/neverthrow
- Papr (Typesafe schemas for mongodb ) -> https://plexinc.github.io/papr/#/
- Awilix (Dependency Inejection) -> https://github.com/jeffijoe/awilix
- Ava (Test Runner) -> https://github.com/avajs/ava
- Fastify -> https://github.com/fastify/fastify
How to run:
git clone git@github.com:inaiat/fastify-sample.git
cd fastify-sample
docker run -d -p 27017:27017 mongo
yarn dev
If everything went well you can play here -> http://localhost:3000/docs