Git Product home page Git Product logo

distribution-viewer's Introduction

Development

Install

Follow these steps to install distribution-viewer locally:

  1. Install any of the following that are not installed already
    • git
    • npm
    • pip
    • postgres
    • python
    • virtualenv
  2. git clone https://github.com/mozilla/distribution-viewer.git
  3. cd distribution-viewer
  4. echo DEBUG=True >> .env
  5. virtualenv env
  6. source env/bin/activate
  7. pip install -r requirements.txt
  8. npm install
  9. npm install -g gulp
  10. Start PostgreSQL
    • Mac: brew services start postgresql (see brew info postgresql for more info)
  11. Set up the database
    1. Create a new user with name distributionviewer and password distributionviewer
      • Mac: createuser --pwprompt distributionviewer
    2. Create a new database named distributionviewer that the distributionviewer user has read/write access to
      • Mac: createdb -Odistributionviewer -Eutf8 distributionviewer
    3. Give the user distributionviewer access to create new tables (needed to run tests later)
      • Mac: psql -c "ALTER USER distributionviewer CREATEDB" postgres

Run

  1. Start PostgreSQL
    • If you just finished the install instructions or if you ran brew services start postgresql at any point in the past, PostgreSQL should already be running
  2. source env/bin/activate
  3. ./manage.py runserver
  4. In another terminal: gulp serve:api
  5. In another terminal: gulp watch
  6. Load 127.0.0.1:8000

New dependencies will need to be installed from time to time. Run the following if you see an error about a missing or out-of-date dependency:

  1. pip install -U -r requirements.txt
  2. npm install

Test

  • ./manage.py test
  • gulp test

distribution-viewer's People

Contributors

openjck avatar spasovski avatar robhudson avatar lonnen avatar

Watchers

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