Giter Site home page Giter Site logo

garpr's Introduction

Environment Setup

  1. Install mongodb
  2. Configure a user and a password for mongo against the admin database.
  3. virtualenv env
  4. source env/bin/activate
  5. pip install -r requirements.txt (make sure to install the right version of mongomock as mentioned below)
  6. Copy config/config.ini.template to /etc/garpr/config.ini and fill it out with a valid database/challonge config (the facebook section is not needed for tests and can be left with the dummy config).

Versions issues

mongomock was installed from master, not 2.0.0

pip install git+https://github.com/vmalloc/mongomock.git@master

Importing Data

Replace garpr_db_dump_folder with the path of the folder where the dump is stored. LIkewise, replace admin and password with the user and password you configured against your admin database.

mongorestore garpr_db_dump_folder -u admin -p password

Running the API server

This runs the server locally on port 3000 with the debug flag set

python server.py 3000 True

Running the Angular app

Start a simple http server serving the pages in the webapp folder

pushd webapp; python -m SimpleHTTPServer; popd

You probably want to change the hostname variable in webapp/script.js and set it to your local api server. It should look something like this.

if (dev) {
    var hostname = 'localhost:3000';
}
else {
    var hostname = 'localhost:3000';
}

Browse to localhost:8000 to view the application.

garpr's People

Contributors

garsh0p avatar jhertz avatar jiangtyd avatar jessemtso avatar yedi avatar

Watchers

Andrew Nestico 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.