Update page 'Home'

Gergely Polonkai 2018-07-23 09:16:01 +00:00
parent cf7079edb4
commit 559a7873ca
1 changed files with 12 additions and 3 deletions

15
Home.md

@ -20,17 +20,26 @@ The development environment is set up to use an SQLite3 database local.db` under
To do so, run To do so, run
pipenv instlal pipenv install
If you also want to do development, you may also run If you also want to do development, you may also run
pipenv install --dev pipenv install --dev
## Create the env file
If you dont 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 ## Create the database
To create the database, you have to run the Flask shell: 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: 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: 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/ After this, your local instance is available on http://127.0.0.1:5000/