This is the data service application for the CS 262 sample Monopoly project, which is deployed here:
- <monopolycaleba-duatenddbsa2csca.eastus2-01.azurewebsites.net>
Based on this URL, the service implements the following endpoints:
/— a hello message/players— the full list of players/players/:id— the single player with the given ID (e.g.,/players/1)/games— the full list of games/games/:id— the single game with the given ID/games/:id/players— the players for a particular game
Also, it gives the following responses:
/players/-1— all invalid IDs like this one return a not-found error/blob— all undefined endpoints like this one return a cannot-get error.
It is based on the standard Azure App Service tutorial for Node.js.
The database is relational with the schema specified in the sql/ sub-directory
and is hosted on Azure PostgreSQL.
The database server, user and password are stored as Azure application settings so that they
aren’t exposed in this (public) repo.
We implement this sample service as a separate repo to simplify Azure integration; it’s easier to auto-deploy a separate repo to Azure. For your team project’s data service, configure your Azure App Service to auto-deploy from the master/main branch of your service repo. See the settings for this in the “Deployment Center” on your Azure service dashboard.