Skip to content

Backend implementation of REST api with Node.js, Fastify, MongoDB and Vitest Tests

Notifications You must be signed in to change notification settings

Joabesv/fastify-crud-backend

Repository files navigation

Fastify backend Implementation

Backend implementation using Fastify to build a REST API. Any help is welcome!

run

  • run pnpm i to install dependencies

  • create a new file .env and fill it with the .env.example content

  • run pnpm start:db to create docker container with mongodb

  • after those steps, start the dev server pnpm start:dev

see the api on http://localhost:3000

MongoDB

  • create connection with MongoDB
  • create user model

APIs

  • GET user
  • GET ALL create user
  • POST user daniloab/koa-crud-backend#10
    • implement body values validation with zod maybe;
    • create new user if valid
    • validate if user exists and return
  • DELETE user

Auth Flow

  • login
  • [] validate user token
  • [] sign up

follow me

Twitter

About

Backend implementation of REST api with Node.js, Fastify, MongoDB and Vitest Tests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published