Git Product home page Git Product logo

hot-hands's Introduction

Hot Hands

A simple web-based Paper-Rock-Scissors game

Development environment

  • Ubuntu 19.04
  • Python 3.7.3
  • NodeJs 10.16.0
  • GIT 2.20.1
  • Visual Studio Code 1.34.0
  • Chromium Web Browser 74.0.3729.169

Deployment environment

  • Heroku

Setup development environment

  • Setup Javascript dependencies
$ npm install
  • Setup python environment and install dependencies
$ sudo apt install python3-venv
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -e .
$ pip install '.[test]'
  • Run server
$ npm run build:dist
$ heroku local web

open browser http://localhost:5000

  • Run server in debug mode
$ source venv/bin/activate
$ export FLASK_APP=server
$ export FLASK_ENV=development
$ flask run
$ npm start

open browser http://localhost:9090

  • Run client tests
$ npm test
  • Run server tests in debug mode
$ python -m pytest tests
  • Run server tests
$ pip install -e .
$ pytest
$ coverage run -m pytest
$ coverage report
$ coverage html  # open htmlcov/index.html in a browser

Heroku tips

prepare environment

$ sudo snap install heroku --classic
$ heroku login

create app

$ heroku create hot-hands --buildpack heroku/python

add build pack

$ heroku buildpacks:add --index 1 heroku/nodejs --app=hot-hands

add heroku to existing git repository

$ heroku git:remote -a hot-hands
$ git push heroku master

force build without change

$ git commit --amend -C HEAD
$ git push heroku -f

hot-hands's People

Contributors

alisol911 avatar

Watchers

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.