1.0.12 • Published 2 years ago

playfab_execute_function v1.0.12

Weekly downloads
35
License
-
Repository
-
Last release
2 years ago

Debugging your PlayFab ExecuteFunction calls locally

To debug your functions locally

  • Install this package with npm i playfab_execute_function
  • Create a folder at the root of your project called ExecuteFunction
  • Add a file to your new folder called settings.json and add the following
{
  "bindings": [
    {
      "authLevel": "function",
      "type": "httpTrigger",
      "route": "CloudScript/ExecuteFunction",
      "direction": "in",
      "name": "req",
      "methods": ["get", "post"]
    },
    {
      "type": "http",
      "direction": "out",
      "name": "res"
    }
  ],
  "scriptFile": "../dist/ExecuteFunction/index.js"
}
  • Add a file to your ExecuteFunction folder called index.ts with the following code
import { AzureFunction, Context, HttpRequest } from "@azure/functions";
import ExecuteFunction from "playfab_execute_function";

const httpTrigger: AzureFunction = async (
  context: Context,
  req: HttpRequest
): Promise<void> => {
  ExecuteFunction(context, req);
};

export default httpTrigger;
  • add "PLAYFAB_TITLE_ID": "<your_playfab_id>" to your Values object in local.settings.json.

  • Add a playfab.local.settings file as described here

Running tests

Run tests with npm run test

1.0.9

2 years ago

1.0.8

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.12

2 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago