Skip to content

Commit 03ad5d1

Browse files
committedMar 20, 2024
docs: update instructions
1 parent 814684f commit 03ad5d1

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed
 

‎README.md

+14-10
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ To run the Flask application, follow these steps:
1212
cd flask-api-sqlite-db
1313
```
1414

15-
1. **Install, initialize and activate a virtualenv using:**
15+
1. **Initialize and activate a virtualenv using:**
1616

1717
```bash
18-
pip install virtualenv
19-
python -m virtualenv venv
20-
source venv/bin/activate
18+
python3 -m venv .venv
19+
source .venv/bin/activate
2120
```
2221

2322
>**Note** - In Windows, the `venv` does not have a `bin` directory. Therefore, you'd use the analogous command shown below:
@@ -26,20 +25,25 @@ To run the Flask application, follow these steps:
2625
source venv\Scripts\activate
2726
```
2827
29-
1. **Install the dependencies:**
28+
1. **Install the app as an editable package:**
3029
3130
```bash
32-
pip install -r requirements.txt
31+
python3 -m pip install -e src
3332
```
3433
35-
1. **Execute the following command in your terminal to start the flask app**
34+
1. **Execute the following command to add the database name and apply the migrations:**
3635
3736
```bash
3837
export DATABASE_FILENAME=testdb.db
39-
export FLASK_APP=src.app
40-
export FLASK_ENV=development
41-
flask run --reload
38+
python3 -m flask --app src.flaskapp db upgrade --directory src/flaskapp/migrations
4239
```
40+
41+
1. **Execute the following command to run the flask application:**
42+
43+
```bash
44+
python3 -m flask --app src.flaskapp run --reload
45+
```
46+
4347
### Run the tests
4448
4549
1. **Inside your virtual environment, execute the following command to run the tests**

0 commit comments

Comments
 (0)
Please sign in to comment.