A simple API to manage customers created with NestJS.
GET /customer
[
{
"name": "name",
"lastName": "last name",
"birthDate": "date",
"cuit": "cuit formatted",
"address": "address",
"mobilePhone": "number formatted",
"email": "email"
},
]
GET /customer/${customerId}
Parameter | Type | Description |
---|---|---|
customerId |
number |
Required. Id of customer to fetch |
{
"name": "name",
"lastName": "last name",
"birthDate": "date",
"cuit": "cuit formatted",
"address": "address",
"mobilePhone": "number formatted",
"email": "email"
}
POST /customer
{
"name": "new customer name",
"lastName": "new customer last name",
"birthDate": "new customer birth date",
"cuit": "new customer cuit",
"address": "new customer address",
"mobilePhone": "new customer mobile phone",
"email": "new customer email"
}
PATCH /customer/${customerId}
{
"name": "new customer name",
"lastName": "new customer last name",
"birthDate": "new customer birth date",
"cuit": "new customer cuit",
"address": "new customer address",
"mobilePhone": "new customer mobile phone",
"email": "new customer email"
}
You can integrate the API into Postman thanks to the Postman collection available on the repository.
To run this project, you will need to add the following environment variables to your .env file
TYPEORM_TYPE
TYPEORM_HOST
TYPEORM_PORT
TYPEORM_USERNAME
TYPEORM_PASSWORD
TYPEORM_DATABASE
Clone the project
git clone https://github.com/emanuelvald/challenge-intuit-backend.git
Go to the project directory
cd challenge-intuit-backend
Install dependencies
npm install
Run Migrations
npm run typeorm:run
Start the server
npm run start
You can navigate to API documentation provided by Swagger simply by acceding to the following path in your browse.
localhost:3000/api