This project serves as an API backend for a Choose Your Own Adventure game. Players can create and update their state while traversing through different story elements. The API is built using [Your Technology Stack] and MongoDB as a database.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Docker
- Make
- [Other technologies]
First, ensure that Docker is installed and you are logged in. If you are using Windows, please enable WSL2 for optimal performance.
-
Clone the repository and navigate to the project root directory.
-
Build the Docker image.
docker build -t cyoa-api .
-
Run the Docker container.
docker run -p 8080:8080 cyoa-api
You should now have the API running at localhost:8080
.
Use Makefile commands for development purposes. Below are some commonly used commands:
- build: Compile the project
make build
- test: Run all tests
make test
Refer to the OpenAPI 3.0 specification file for details on API endpoints and request-response structures.
If you are not able to insert data into MongoDB when creating a player state or story elementr, ensure that:
- MongoDB is running and accessible.
- The context timeout in the handler functions is appropriately set.
This project is licensed under the MIT License