Welcome to the world of card games. Card games are an amazing way to pass your time and, at the same time, strategize when playing games like poker, 21, or blackjack. The purpose of this repository is to enable robust backend API support that allows you to play any card game with ease.
You can run this project on your local machine provided that you meet the prerequisites required for this application.
- You should have Golang installed on your system. If already installed, you can proceed ahead; otherwise, download it using the link here.
- Postman is required for testing APIs and executing BDD tests. If already installed, you can proceed ahead; otherwise, download it using the link here.
- Clone this repository using the command
git clone https://github.com/varadekd/card-game.git
. - Enter the folder using the command
cd card-game
. - Export the default path for the file. Please ensure you're in the root directory when exporting. You can use the command
export DEFAULT_CARDS_FILE_STORAGE=<working_dir>/card-game/data/cards.json
. - Start the application by running the command
go run main.go
. Please ensure you are in the root directory when starting the application.
The application will start on port 8080. You can import them using this link.
- Export the default path for the file. Please ensure you're in the root directory when exporting. You can use the command
export DEFAULT_CARDS_FILE_STORAGE=<working_dir>/card-game/data/cards.json
. - To start the test execution, run the command
go test ./tests/...
. Please ensure you're in the root directory when executing the test cases.
Note: All the TDD test cases are located under the directory called "tests."
- Import this link into Postman.
- Right-click on the imported collection and click on Run Collection.
- You will now see all the APIs that you want to run. Click on the button labeled Run.
- Once the execution is completed, you will get the list of all the test cases run and their results.
- We used Go for the development of this project.
- We used Gin-Gonic for providing HTTPS functionality.
- We used chai.js for writing BDD test cases
The APIs were developed and tested on Ubuntu 22.04 LTS. In case you are facing any troubles, please write back to varadekushagra@gmail.com.