About | Technologies | How to use | Routes tables
This repository was made to store the Cowala Challenges. These challenges are part of a selection process for a job opportunity.
I preferred to use a light organization just for readability.
The specific code for the challenges is in the services.
- ✅ NodeJS >= 17.3.0
- ✅ Yarn >= 1.22.15
- ✅ Git >= 2.31.1
Clone the project repository
git clone https://github.com/k1vz/teste-cowala.git
Access project folder
cd teste-cowala
Install all dependecies
yarn
Run in develop mode (fastest way)
yarn dev
Request | Method | Route URI | Body | Response |
---|---|---|---|---|
Fibonnaci (fibonnaci.js) |
POST | /algoritmos/fibonnaci | { "num": number } |
number[] |
Classifier (classificador.js) |
POST | /algoritmos/classificador | { "souEu": boolean, "responsavel": boolean, "nome": string } |
string[] |
Cleaner (faxina.js) |
POST | /algoritmos/faxina | { string: string OR string: null } |
{ string: string } |
Check Vality (validade.js) |
POST | /algoritmos/validade | { "date": Date, "vality": string } |
boolean |
Create Frame (moldura.js) |
POST | /algoritmos/moldura | { "height": number, "width": number } |
--- |
Request | Method | Belongs to | Route URI | Body | Response |
---|---|---|---|---|---|
Create item in list | POST | Mercado | /back-end/mercado/create | { "id": number, "item": string, "preco": number } |
"Status 200: Done!" |
Read all items | GET | Mercado | /back-end/mercado/readAllItems | --- | [ { "id": number, "item": string, "preco": number } ] |
Read only | POST | Mercado | /back-end/mercado/readOnly | { "id": number } |
{ "id": number, "item": string, "preco": number } |
Update price | POST | Mercado | /back-end/mercado/update | { "id": number, "preco": number } |
"Status 200: Done!" |
Delete item | POST | Mercado | /back-end/mercado/delete | { "id": number } |
"Status 200: Done!" |
--- | --- | --- | --- | --- | --- |
Create conversion | POST | Conversão de Moedas |
/back-end/conversao/create | { "id": number, "moedaOriginal": string, "moedaDeConversao": string, "valorEnviado": number } |
{ "id": number, "moedaOriginal": string, "moedaDeConversao": string, "valorEnviado": number, "valorConvertido": number } |
Read all items | GET | Conversão de Moedas |
/back-end/mercado/readAllItems | --- | [ { "id": number, "moedaOriginal": string, "moedaDeConversao": string, "valorEnviado": number, "valorConvertido": number } ] |
Read only one item | POST | Conversão de Moedas |
/back-end/conversao/readOnly | { "id": number } |
{ "id": number, "moedaOriginal": string, "moedaDeConversao": string, "valorEnviado": number, "valorConvertido": number } |
Delete item | POST | Conversão de Moedas |
/back-end/conversao/delete | { "id": number } |
"Status 200: Done!" |