Skip to content

LBeghini/NumeRomans

Repository files navigation

🏛️ NumeRomans

About

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

✨ Features

  • convert from normal numbers to Roman Numerals
  • convert a numeral to digit

🧬 Technologies

  • Node.js
  • Express
  • TypeScript
  • Husky
  • Prettier
  • Eslint

📌 Requirements

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

⚙️ Setup

Before running the code, you need to install the dependencies. From a terminal at the root directory of the project, run:

npm install

▶️ Running

To run the code, from a terminal, on the project's root directory, run:

npm start

🧭 Usage

From a browser, go to url localhost:5000. If everything is working fine, you should be able to see It works! 🚀 on the page.

Roman to Number

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.

Number to Roman

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.

🧪 Tests

To run the implemented tests, from a terminal, on the project's root directory, run:

npm test

📋 Development

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!