Welcome to NumToEn!
This is an API written in golang to translate a number into english words.
The endpoint accepts numbers between -9223372036854775808 and 9223372036854775807
For running locally with Docker container
Download from DockerHub
docker pull scyanh/numtoen:latest
Run container
docker run -d -p 5000:5000 scyanh/numtoen:latest
Endpoint to translate numbers...
http://localhost:5000/num_to_english?number=123
Endpoint to documentation...
http://localhost:5000/swagger/index.html
Run the tests
Open Docker cli from your container and run
go test -v
For Deployment the container on Heroku
Clone repository and navigate to the app’s directory
git clone https://github.com/scyanh/numtoen
cd numtoen
Download and install the Heroku CLI
brew tap heroku/brew && brew install heroku
Log in to Heroku
heroku login
Log in to Container Registry:
heroku container:login
Create a Heroku app (it will create a random appname)
heroku create
Build the image and push to Container Registry:
heroku container:push web -a yourappname
Then release the image to your app:
heroku container:release web -a yourappname
Now open the app in your browser:
heroku open -a yourappname
Live API Documentation...
https://infinite-falls-90558.herokuapp.com/swagger/index.html
Live API Endpoint to translate numbers...
https://infinite-falls-90558.herokuapp.com/num_to_english?number=123