HangmanAPI is a simple simulation of the hangman game. It contains a CRUD interface for adding new words and the ability to create games and make guesses on them.
Pre-requisites: Docker desktop using Linux Containers. To run the application locally.
- Open the solution file.
- Set the docker-compose project in solution explorer as the main start-up project.
- Run docker-compose to create the database and api containers.
- The application should run and the swagger page should display.
In order to run the tests, you first must create the containers so the database is accessible. Alternatively, you can point the connection string to a different database.
The connection string for development (appsettings.json) will need to be changed to use localhost as the server name for the database, instead of db when running the docker-compose for debugging. See example below
running tests
"Server=localhost;Database=HangmanAPI;User=sa;Password=examplepassword;"
running Docker compose
"Server=db;Database=HangmanAPI;User=sa;Password=examplepassword;"