Virtual Env:
sudo apt-get install python-pip
sudo pip install virtualenvNode:
sudo apt-get install nodejs
sudo ln -s /usr/bin/nodejs /usr/bin/nodeWebpack:
sudo npm install -g webpackClone and change directory:
git clone https://github.com/tomkoker/bookflip && cd bookflipCreate python virtual environment:
virtualenv -p /usr/bin/python2.7 venv
source venv/bin/activateInstall dependencies:
pip install -r requirements.txt
npm installCreate instance folder and config file:
mkdir instance && touch instance/config.pyInitialize database:
python init_db.pyBuild and start the server:
webpack
python run.pyResponses All responses will look like the following:
{
"status": "success", // 'error' or 'fail'
"data": {...}
}Routes
| Location | Input | Description |
|---|---|---|
/api/signup |
username, password, email | Creates a new user |
/api/activate/<payload> |
Activates user | |
/api/login/ |
username, password | Logs in user |
/api/logout/ |
Logs out user | |
/api/me/ |
Returns user status | |
POST: /api/listings/ |
listing | Creates a new listing |
GET: /api/listings/ |
Shows all listings | |