From 659fad1356b90e4ca4491bc6fc02b8630c334830 Mon Sep 17 00:00:00 2001 From: Rien Maertens Date: Tue, 2 Oct 2018 01:21:19 +0200 Subject: [PATCH] Improve first time installation experience --- README.md | 25 +++++++++++++++++++++++++ app/app.py | 5 +++++ 2 files changed, 30 insertions(+) diff --git a/README.md b/README.md index be7776a..a4719de 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,27 @@ # Mattermore Mattermost integrations + +## Installation guide + +1. Clone this repository +``` +git clone ssh://git@git.zeus.gent:2222/mattermost/mattermore.git +cd mattermore +``` +2. Create a virtual environment +``` +virtualenv -p python3 venv +``` +3. Install the pip requirements +``` +./venv/bin/pip install -r requirements.txt +``` +4. Create the database +``` +./venv/bin/python setup_database.py +``` +5. Start the server +``` +./venv/bin/python run_dev.py +``` + diff --git a/app/app.py b/app/app.py index 4b95af0..b0e921c 100644 --- a/app/app.py +++ b/app/app.py @@ -17,6 +17,11 @@ response_setting = "in_channel" from app import models +@app.route('/', methods=['GET']) +def hello_world(): + message = "It's aliiiiiiiiiiiiiiiiiiiiiive!\n" + message += f"There are {models.User.query.count()} users in the database." + return message def check_regular(username): '''Check if a user has the permissions of a regular user.'''