BR
bruno-queiroz/plinko-challenge
A MongoDB + NodeJS + Typescript APi with a single endpoint.
Plinko challenge
A MongoDB + NodeJS + Typescript APi with a single endpoint.
How to start the project
-
Clone the project
git clone https://github.com/bruno-queiroz/plinko-challenge.git -
Install dependencies
npm install -
Create a .env file on the root of the project
-
Copy the environment variable from the .env.example file to the .env file
-
Make sure to have MongoDB running locally
sudo systemctl start mongod -
Run the app
npm run dev
Endpoint
GET /bet?bet=3&rows=8&risk=low
curl -i -H 'Accept: application/json' http://localhost:3000/bet?bet=3&rows=8&risk=low
| Params | Constraints |
|---|---|
| bet | A number value that should be greater than 1 |
| rows | A number value that should be greater than 8 and less than 16 |
| risk | 3 possible options: "low" | "medium" | "high" |
Tests
Run tests
npm run test
On this page
Contributors
Created February 16, 2024
Updated June 21, 2024