Skip to content

Latest commit

 

History

History

AzureFunctions

Tic-Tac-Toe Azure Functions

Index

Description

This project has a set of Azure Functions used for managing the Tic-Tac-Toe sample's logic.

Azure Function List

These are the current functions and their responsibilities:

Function Responsibility Link
CreateMatchLobby Allows us to create a Match Lobby, where two players will face each other. Link
DeleteMatchLobby Allows us to delete an existing Match Lobby from Cosmos DB. Link
JoinMatchLobby Adds an player to an specific Match Lobby. Link
LeaveMatchLobby Allows a player to leave an specified Match Lobby. Link
SearchMatchLobbies Performs a Match Lobby search, based in their names and Ids. Link
SetMatchLobbyLockState Allows us to lock or unlock a Match Lobby. Link

Configuration

Pre-requisites

Before configuring this project, first ensure you have completed the next pre-requisites:

Configuration steps

Follow up the next steps for configuring this project to run in an Azure environment:

  1. First, retrieve the next information from your PlayFab Title, as we'll be using them later:

    1. Retrieve your PlayFab's title ID.
    2. Retrieve your Title's developer secret key.
  2. Create an Azure Function app in your Azure personal account following this guide.

  3. Add the next application settings in your function app (you can follow up this guide):

    1. PLAYFAB_TITLE_ID: configure it with your PlayFab's title ID.
    2. PLAYFAB_DEV_SECRET_KEY: configure it with your Title's developer secret key.
    3. PlayFabTicTacToeCosmosDB: retrieve your AZ CosmosDB connection string.
  4. Open the TicTacToeFunctions project using Visual Studio or Visual Studio Code.

  5. Publish the TicTacToeFunctions project in your Azure Function App:

    1. If your are using Visual Studio, follow this guide.
    2. If your are using Visual Studio Code, follow this guide.
  6. Enable CORS in your Azure Function APP from the Azure Portal (you can follow this guide).

    NOTE: The enable all possible domains, you can use the * wildcard.

Retrieve Azure Functions URLs

For getting your Azure Functions URLs, following the first steps of this tutorial.

Technologies