Scoreboardly is a REST API for storing and retrieving high scores in games that runs in Azure using Azure Functions and Cosmos DB.
To build and run the project locally, you'll need to install the following prequisites:
- A database called
Scoreboardlywill need to be created. - A container called
Scoreboardswill need to be created in theScoreboardlydatabase.
/idshould be used as the parition key.
- Configure a
local.settings.jsonfile, and add aCOSMOS_DB_CONNECTION_STRINGproperty that points to the connection string the Cosmos DB Emulator uses.
To install the required packages, and build, run the following commands:
dotnet restore
dotnet build
To run the Azure Function locally, run the following command:
cd Scoreboardly.Applications.Functions
func start
- Get All Scoreboards :
GET /api/scoreboards - Get Scoreboard by ID :
GET /api/scoreboards/:id - Create Scoreboard :
POST /api/scoreboards - Add Scoreboard Entry :
PUT /api/scoreboards/:id
Feel free to create issues, or submit a PR. Run the npm run eslint --fix src command and fix warnings before submitting PRs.
MIT © Jason Shands