AB-INBEV recruitment assessment task.
AB-INBEV assessment documentation link
User can sign up.
User can sign in.
An Authenticated user can calculate the area of different shapes.
An Authenticated user can fetch all previous computation record.
Ensure that you have NodeJS and npm installed in your computer
a. Clone this repository into your named folder
git clone https://github.com/markeu/AB-INBEV-ASSESSMENT.git
git status
b. Install the project dependencies
yarn
c. Start the application
yarn start
The application can be tested locally through localhost on port 5000 or through the live url using postman or easily using the documentation link url
- Run the application while postman is open
- Go to postman and test against the endpoints below with the required property:-
Method | Endpoint | Enable a user to: |
---|---|---|
POST | /signup | Create user account |
POST | /login | Login a user |
POST | /calculate | Calculate the area of different shapes |
GET | /fetchRecords | Fetch all my previously computated data |
To calculate for the area of a triangle.
{
"shape": string,
"dimension: {"a": number, "b": number, "c": number}
}
To calculate for the area of a rectangle.
{
"shape": string,
"dimension: { "a": number, "b": number }
}
To calculate for the area of a square or circle.
{
"shape": string,
"dimension: number
}
- Uche Uzochukwu Mark