Skip to content

My solution (TypeScript version) to the Back-End BR "loans" challenge.

License

Notifications You must be signed in to change notification settings

HenriqueSilverio/Loans.TypeScript

Repository files navigation

Loans.TypeScript

My solution (TypeScript version) to the Back-End BR "loans" challenge.

Prerequisites

Environment variables

In project's root directory, create a .env file:

cp .env.example .env

Then fill the values in your .env file accordingly.

Variable Description
SERVICE_NAME String. Application's name.
SERVICE_HTTP_PORT Number. HTTP server port.

Building and Running with Docker

Build

docker build -t loans .

Run

docker run --rm -it --name loans loans

Access

docker exec -it loans /bin/sh

REST API

Method URI Description
POST /match-profile List loans that match a given customer profile.

Example Payload

{
  "age": 26,
  "cpf": "275.484.389-23",
  "name": "Vuxaywua Zukiagou",
  "income": 7000.00,
  "location": "SP"
}