Giter Site home page Giter Site logo

poker_app's Introduction

Poker App

Requirements

Installation Instructions

These instructions assume you have python, virtualenvwrapper and node installed. Flask and webpack will be installed in the course of these instructions. The Poker Simulator project is used as an imported package. Whilst it is still in development, you probably want to keep it as an accessible project folder rather than getting it through pip install. Clone it from Poker Simulator and keep it updated through regular calls to git pull.

  1. Navigate to the Poker App directory

     cd /path/to/poker_app
    
  2. Create a new virtual environment

     mkvirtualenv poker --python=python3
    
  3. If your virtual environment is not immediately activated, enter it with

     workon poker
    
  4. Install required python packages

     pip install -r requirements.txt
    
  5. Add the directory containing your Poker Simulator package to the virtual environment path

     add2virtualenv /path/to/packages 
    

    where the Poker Simulator package is located at /path/to/packages/poker_simulator

  6. Install the required node modules

     npm install
    
  7. Compile the javascript

     webpack
    

Usage

Two scripts have been provided to provide easy execution:

  • pokerapp-debug.sh
  • pokerapp.sh

On Linux / BSD systems, simply executing these in a console should work. On windows, use:

	sh pokerapp.sh

Once this is running, open a web browser, and head to localhost:5000.

Development

Use pokerapp-debug.sh to run a development server that will reload whenever there is a change to the python webserver code. To have the javascript compile as you edit it, open another terminal and run

	webpack --watch

On other devices

Use pokerapp.sh to run a webserver visible to other devices. You will still be able to run webpack watcher for live javascript editing as this does not affect the python server.

Some browsers, e.g. Chrome on mobile, will attempt to cache the js file on page load and will therefore not register any changes you make. To get around this, use Chrome's incognito mode. You will still need to close the browser window and reopen it if any code changes but at least you won't need to clear your cache every time.

Cleaning up

  1. Use ctrl+c to kill the webserver and webpack watcher in each of their terminal windows

  2. Exit the virtual environment

     deactivate
    

poker_app's People

Contributors

marlanperumal avatar hrudham avatar

Watchers

James Cloos avatar  avatar  avatar  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.