Bhupesh-V / roman-to-no-api

A REST API to Convert Roman Numeral to Integral Value

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Roman To Decimal Converter

A simple REST API to Convert Roman Numeral to an Decimal Value

Go codecov


NOTE: this little project was given as a coding assignment for a Golang role(junior). I didn't get selected, might help someone

Demo

demo-api

End Points

  1. POST: 127.0.0.1:8080/roman

    Post Body

    {"roman": "MCMXCIV"}
    

    Response

    {"integer":1994,"roman":"MCMXCIV"}
    

Installation

  1. Clone the repository

    git clone https://github.com/Bhupesh-V/roman-to-no-api
    cd roman-to-no-api
  2. Install dependencies

    go get ./...
  3. Run Tests

    go test ./... -v -coverpkg=./... -coverprofile=coverage.out
    go tool cover -html=coverage.out
  4. Run Gin Development server

    go run main.go

License

Copyright © 2021 Bhupesh Varshney.
This project is MIT licensed.

About

A REST API to Convert Roman Numeral to Integral Value

License:MIT License


Languages

Language:Go 100.0%