From 38c398deb946c9b33c6e25e71961a5da9a9c337e Mon Sep 17 00:00:00 2001 From: Dos Reis Cedric <cedric.dosreis@gmail.com> Date: Thu, 19 Dec 2019 10:40:11 +0100 Subject: [PATCH] doc --- lab5/src/README.md | 74 +++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 43 deletions(-) diff --git a/lab5/src/README.md b/lab5/src/README.md index 929ba25..caa6d09 100644 --- a/lab5/src/README.md +++ b/lab5/src/README.md @@ -7,75 +7,63 @@ 1. Install `virtualenv` package and create a new environment in the `./src` folder project - + On Linux and macOS : - On Linux and macOS : - +```python +python3 -m virtualenv env +``` - ``` - python3 -m virtualenv env - ``` + On Windows : - - On Windows : +```python +python -m virtualenv env +``` - ``` - python -m virtualenv env - ``` - - 2. Activate the virtual environment with : - + On Linux and macOS : - On Linux and macOS : +```python +source env/bin/activate +``` - + On Windows : - ``` - source env/bin/activate - ``` - On Windows : - - ``` - .\env\Scripts\activate - ``` - -3. Then install all packages dependencies in `requirements.txt` : +```python +.\env\Scripts\activate +``` - +3. Then install all packages dependencies in `requirements.txt` : - ``` - pip install -r requirements.txt - ``` +```python +pip install -r requirements.txt +``` 4. Define environment variables - - - On Linux and macOS : + On Linux and macOS : - ``` - export FLASK_ENV=development - export FLASK_APP=app.py - ``` +```python +export FLASK_ENV=development +export FLASK_APP=app.py +``` - On Windows : + On Windows : - ``` - set FLASK_ENV=development - set FLASK_APP=app.py - ``` +```python +set FLASK_ENV=development +set FLASK_APP=app.py +``` ## Starting the web server (REST API) -``` +```python python -m flask run ``` -- GitLab