# README
credit-card-number-validator
Just a simple Golang project to gain proficiency.
The web server only has two endpoints:
/ping
to check if the server is working./validate
to validate a credit card number using Luhn Algorithm
To start up the web server, either
- At root, run:
go run main.go
- Or use Docker:
- Build image:
docker build -t credit_card_number_validator .
- Run container:
docker run -p 8081:8080 credit_card_number_validator
Example:
/ping
curl -X GET "localhost:8081/ping"
/validate
curl -X POST "localhost:8081/validate" -H "Content-Type: application/json" -d '{"creditCardNumber": "17893729974"}'
# Packages
No description provided by the author