Coder Social home page Coder Social logo

qima / photon.webhooks.turnbased.waws Goto Github PK

View Code? Open in Web Editor NEW

This project forked from exitgames/photon.webhooks.turnbased.waws

0.0 2.0 0.0 256 KB

WAWS/C# (Azure Websites) reference implementation for Webhooks.

Home Page: https://www.exitgames.com/en/Turnbased

License: MIT License

C# 99.79% ASP 0.21%

photon.webhooks.turnbased.waws's Introduction

Photon Turnbased Webhooks Sample

Summary

This is the Photon Turnbased Webhooks sample using Azure Websites and Blob Storage and Table Storage for persitence.

Requirements

Option 1: Azure Storage

  • Azure Account: It is free (but you need to enter a Credit Card)
  • Azure Storage: Create a "STORAGE" > Quick Create (enter Name and Region)

Option 2: Redis

Set this project up for free now! Check out all the possibilities of Microsoft Azure!

Sign up for your free trial month of Microsoft Azure now and get USD 200 / EURO 150 to spend on all(!) Azure services you like to try out – without any further obligation!
You’ll get the full power from the Cloud and you can choose yourself, how to spend your balance!

http://aka.ms/exitgames_azure

For authentification purposes you’ll need a credit card to sign up. Without a credit card request a free Microsoft Azure Pass simply by sending a short note to [email protected]. Use the Microsoft Azure Pass to sign up at www.windowsazurepass.com and you’ll also discover the cloud power of Microsoft Azure for free!

Run it locally

  • Open the sample running Visual Studio as administrator and build the project (admin privileges are required because a virtual directory is used).
  • Option 1: Azure Storage, web.config <add key="DataAccess" value="Azure"/>
    • Select the Azure Storage > Manage Access Keys (copy paste into the config)
    • set <add key="AzureAccountName" value="" />
    • set <add key="AzureAccountKey" value="" />
  • Option 2: local Redis, web.config <add key="DataAccess" value="Redis"/>
    • set <add key="RedisPassword" value=""/>
    • set <add key="RedisUrl" value="127.0.0.1"/>
    • Start local redis server
  • Start ngrok in a command shell: ngrok 80 and copy the url which forwards to 127.0.0.1:80.
  • go to the Photon Dashboard, create an application and set in the Webhooks tab the BaseUrl value: [url from ngrok]/turnbased/[your app id]/.
  • run the client demo
  • check the requests and responses in your browser at 127.0.0.1:4040

Next Steps

Publish to Azure Websites

  • Create an Microsoft Azure Websites account, create a website, load down a publisher profile and publish the side to Azure Websites. Don't forget to change the Redis settings to point to your Redis server (you can use your local server by forwarding the corresponding port with ngrok to your PC)
  • adjust the base url in the Photon Dashboard

Modify the webhooks logic

photon.webhooks.turnbased.waws's People

Contributors

exitgames avatar saltrichter avatar archgl avatar

Watchers

马骐 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.