MatiasMonasterio / cambalache-api

Home Page:https://cambalache-apirest.herokuapp.com/documentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get Started

Prerequisites

You need to be using:

Docker Compose

This project is ready to work with docker-compose to initalize the needed stack during development process. To start working, run the following commands:

docker-compose build
docker-compose up

Environment Variables

Create an .env file in the root project and provide the following values:

PORT=3001

DATABASE_URL=postgresql://develop:develop@127.0.0.1:5432/develop
REDIS_URL=redis://127.0.0.1:63

JWT_SECRET=somevaluetouse

Run locally

You need Node v16.15.0 Set versions manually or with nvm:

nvm use

Install the required libraries and packages dependencies

yarn install

Run prisma migrate and generate to use prisma client and types in proyect

yarn prisma:migrate
yarn prisma:generate

Run the development server

yanr dev

You can quickly have a look at the data of your local database and check if your app is working correctly with prisma studio

yarn prisma:studio

Production

You can create a production build with

yarn build

Documentation

Uou can access the documentation available in production