From 559a7873ca6ba29a3ff5267d95be9a1791874471 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Mon, 23 Jul 2018 09:16:01 +0000 Subject: [PATCH] Update page 'Home' --- Home.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Home.md b/Home.md index 87fa5eb..f63f9ab 100644 --- a/Home.md +++ b/Home.md @@ -20,17 +20,26 @@ The development environment is set up to use an SQLite3 database local.db` under To do so, run - pipenv instlal + pipenv install If you also want to do development, you may also run pipenv install --dev +## Create the env file + +If you don’t mind constantly prepend your commands with `env FLASK_APP=calsocial:app FLASK_ENV=development`, you can skip this step. Subsequent sections assume you did not skip. + +Create a file called `.env` in the root of the cloned repository with the following content: + + FLASK_APP=calsocial:app + FLASK_ENV=development + ## Create the database To create the database, you have to run the Flask shell: - pipenv run env FLASK_APP=calsocial:app FLASK_ENV=development flask shell + pipenv run env flask shell When you see the `>>>` prompt, use the following two-liner to create the database tables: @@ -43,6 +52,6 @@ db.create_all() To start the app, you just have to run `calsocial` as a module: - pipenv run env FLASK_APP=calsocial:app FLASK_ENV=development flask run + pipenv run env flask run After this, your local instance is available on http://127.0.0.1:5000/ \ No newline at end of file