Just a silly API to simulate a dice roll.
To use it, make a GET request with the number of sides in the URL.
Example: http://localhost:5555/d4
It can be used to simulate multiple dices:
- d4: to simulate a dice with 4 sides;
- d6: 6 sides;
- d8: 8 sides;
- d10: 10 sides;
- d12: 12 sides;
- d20: 20 sides;
The objective was to build a simple API using nothing but Node.js, no Express or other framework.
Simply clone the repository, navigate to the folder, install the dependecies with npm install
and acces it with an API client (Insomnia, Postman) on http://localhost:5555/:dice