This is an API developed to convert Roman Numerals to integers and vice-versa.
I | V | X | L | C | D | M |
---|---|---|---|---|---|---|
1 | 5 | 10 | 50 | 100 | 500 | 1000 |
- convert from normal numbers to Roman Numerals
- convert a numeral to digit
- Node.js
- Express
- TypeScript
- Husky
- Prettier
- Eslint
To run this project, be sure to have installed:
After that, you need to clone this repo:
git clone https://github.com/LBeghini/NumeRomans.git
Before running the code, you need to install the dependencies. From a terminal at the root directory of the project, run:
npm install
To run the code, from a terminal, on the project's root directory, run:
npm start
From a browser, go to url localhost:5000.
If everything is working fine, you should be able to see It works! 🚀
on the page.
To convert a roman numeral to a number, go to the url:
localhost:5000/roman?character={roman-number-to-convert}
Replace {roman-number-to-convert} to any roman numeral you want.
To convert a roman numeral to a number, go to the url:
localhost:5000/arabic?character={number-to-convert}
Replace {number-to-convert} to any number you want, ranging from 1 to 3999.
To run the implemented tests, from a terminal, on the project's root directory, run:
npm test
The entire solution was build using TDD and Clean Code best pratices. A GitHub Project was created to control the tasks needed to develop the project, and each issue describes better what each step did and had to implement.
Before starting, an entire setup for a Node.js with Express and TypeScript was created, using linters and pre-commit rules.
⚖️ License
Feel free to modify as you wish!