Giter Site home page Giter Site logo

pwp_gamehub's Introduction

PWP SPRING 2021

GameHub

GameHub is an API to make interesting website for video games and who love video games!

Group information

Remember to include all required documentation and HOWTOs, including how to create and populate the database, how to run and test the API, the url to the entrypoint and instructions on how to setup and run the client

Initializing the database

Description

Our database system and its entities and their relations has been explained in the wiki page. For this implementation we used SQLite3 However, in this section, we will introduce the simple commands to run the project and initialize the DB.

We did not use the so-called ready to user database engines for three reasons.

  • First, we wanted to keep the project as simple as possible for our learning purpose.
  • Second, in the upcoming deadlines for the project we may have some complex sql queries.
  • And the third, this was the fastest way we know when we were designing the project.

Run

Before runing the project please install the requirement of the project available in the requirements.txt file.

To init the database and populate it with some entities:

$ export FLASK_APP=API
$ export FLASK_ENV=development
$ flask init-db

The above command will run our database initializer using the already-defined schema which is available in the directory databae/schema.sql, and then to populate the DB with some pre-defined data, it will use the database/data.sql file. The instance file of the database, since we are using the sqlite is available in the instance/db.sqlite file.

To run the application on the port of 5000:

$ python3 app.py

ACCESS to the API Documentation

You can access the API documentation by visiting the following url: http://localhost:5000/apidocs/

RUN THE CLIENT

$ cd client
$ python cmd_client.py

    ********************************************************************************
    ***************************** WELCOME TO **************************************
    ***************************** THE **********************************************
    ***************************** GAME *********************************************
    ***************************** CLIENT *******************************************
    ***************************** **************************************************
    ********************************************************************************
    1 - for login
    2 - for signup
    

TEST

To test and see the coverage status, run the following commands:

$ coverage run -m pytest
$ coverage report

pwp_gamehub's People

Contributors

vahidmohsseni avatar sadafnazari avatar kiarostami 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.