Getting Started
Fork and clone
For use this API, first you need to fork the repository and clone the project in your computer, for do this go to Official Repository and fork, after clone the repository with the method that you prefer.
Install modules
With the project in your computer, you need to install all modules, you can do this with one of the following commands.
With npm:
npm installor with yarn
yarnor with pnpm
pnpm installDatabase
This project use the ORM Prisma with PostgreSQL database, then for do something you need to install the postgresql and configure, here the PostgreSQL Website or if you have Docker installed, you can run the following command.
docker run --name postgres -p 5432:5433 -e POSTGRES_USER=admin -e POSTGRES_PASSWORD=admin -e POSTGRES_DB=admin -d postgres:13you can change the -e (Environment) values with something that you prefer
Then, you need to create a .env file and and the following key-values:
PORT= the post number of the server
DATABASE_URL= the database url, is like this: postgresql://johndoe:randompassword@localhost:5432/mydb
ACCESS_TOKEN_SECRET= the secret key for authenticationafter install postgresql and create .env, you need to run npm run migrate:deploy, for create the tables.
Running the project
Now if you follow the instructions, you only need to run:
npm run devor with yarn
yarn devor with pnpm
pnpm run devTesting
If you want to run the tests suits, first you need to run npm run docker:up for create the docker container and then run npm run test