Skip to content

hknsh/project-knedita

Repository files navigation

Project Knedita

A simple RESTful API made with NestJS and Fastify.

🚀 Preparing the environment

Make sure that you have Bun, Docker and Docker Compose installed on your computer.

This project also works with Node and Npm.

First, install the necessary packages with the following commands:

bun i

After that, you can update the .env and the docker.env files. The .env file is for development environment and the docker.env is for production.

You can find the templates for those files on .env.example and docker.env.example.

To run the necessary services you can execute the following command:

bun docker:db

This will start the following services:

  • PostgreSQL
  • Redis
  • MinIO

Apply the migrations to the database with the following command:

bun migrate:dev

And now, you can start the server with the command:

bun dev:start

You can check the documentation accessing the endpoint / in your browser

To run in production you can use the following command:

bun docker

This will start all the previous services and the back-end image.

🗄️ Stack

This back-end uses the following stack:

  • NestJS
  • Fastify
  • Prisma
  • MinIO
  • PostgreSQL
  • Redis
  • Swagger
  • Typescript

License

MIT