6.813 Project
It doesn't make sense for us to go through the work of re-creating all of
our "ConsumableItems" databases by hand on each of our machines,
so we'll have it checked in as the file items.json
.
To load it into your local database, run
python app/item_util.py --load items.json
If you make changes to the items database you'd like to share (such as adding a bunch),
python app/item_util.py --dump > items.json
Ok - using mongo on the backend. Here are (hopefully) sufficient instructions for getting things up and running.
- Install Mongo
- You should do this using Homebrew, so make sure you have that installed
- install mongo:
brew install mongodb
- note the output at the end of the install which will tell you how to make sure that mongo is always running, you should probably follow those instructions, it will make your life easier.
- Install and set up virtualenv
Virtualenv is a tool to isolate python projects, which may have different dependencies, from eachother. It is a very useful tool.
- you already have pip, so
sudo pip install virtualenv
should do it. - then, from inside the
treattrackr
folder, dovirtualenv env
. - next, run
source env/bin/activate
- you'll have to run
source env/bin/activate
in every terminal you open for treattrackr.
- Install dependencies
With virtualenv, this is easy:
pip install -r requirements.txt
This will install all the dependencies listed into a subdirectory of the env
folder you just created.
- Confirm things are working
python app/main.py
- go to
localhost:6813/admin/users
and try to create a user