Skip to content

Files

Latest commit

2249a91 · Jul 15, 2020

History

History
36 lines (25 loc) · 2.41 KB

README.md

File metadata and controls

36 lines (25 loc) · 2.41 KB

Build Status Documentation Status

Getting Unstuck Web

This is the web app for Getting Unstuck, a Scratch learning experience developed by the Creative Computing Lab at the Harvard Graduate School of Education.

API docs for development: here

Requirements

  • OS: tested on Windows 10, Mac, and Linux
  • Python 3.7 or higher
  • MongoDB 4.0 or higher
  • RabbitMQ 3.8 or higher
  • (Production) Server software, like Apache or Nginx

Setup

Assuming all the dependencies above are met, you'll need to do the following to get the web app running:

  1. Clone this directory.
  2. In the secure subdirectory, copy celery.json.example to celery.json. In celery.json, change name to be the app name. The broker_url is the Celery broker URL for task management. The result_backend is the Celery result backend URL for task management.
  3. In the secure subdirectory, copy db.json.example to db.json. In db.json, type in your database credentials. If you have a database URI, copy that into the host field.
  4. Open lib/settings.py in a text editor. Change the fields as necessary.
  5. In the repository directory, create a Python virtual environment of your choice. Activate the virtual environment and run pip install -r requirements.txt to install the Python dependencies.

Running the server

In a development environment, running the server is simple.

  1. Make sure the MongoDB and RabbitMQ servers are running.
  2. Navigate to the repo directory and activate the virtual environment in two terminal windows/tabs.
  3. In the first terminal window, run flask run.
  4. In the second terminal window, run celery -A app.celery worker --pool=solo -l info.
  5. Navigate to http://localhost:5000 in your browser to start using the web app. When first setting up the server, go to http://localhost:5000/setup to set up the first admin user.