Skip to content

Commit 7f9bd2c

Browse files
author
App Generator
committed
Update README.md
1 parent aa27e6d commit 7f9bd2c

File tree

1 file changed

+30
-22
lines changed

1 file changed

+30
-22
lines changed

README.md

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,27 @@ It has all the ready-to-use bare minimum essentials.
1414

1515
<br />
1616

17+
## Quick Start in [Docker](https://www.docker.com/)
18+
19+
> Get the code
20+
21+
```bash
22+
$ git clone https://github.com/app-generator/api-server-flask.git
23+
$ cd api-server-flask
24+
```
25+
26+
> Start the app in Docker
27+
28+
```bash
29+
$ docker-compose pull # download dependencies
30+
$ docker-compose build # local set up
31+
$ docker-compose up # start the app
32+
```
33+
34+
The API server will start using the PORT `5000`.
35+
36+
<br />
37+
1738
> **[PRO Version](https://github.com/app-generator/api-server-flask-pro)** available: MongoDB persistance, Docker, Unitary Tests, 24/7 LIVE Support via [Discord](https://discord.gg/fZC6hup)
1839
1940
> Can be used with other [React Starters](https://appseed.us/apps/react) for a complete **Full-Stack** experience:
@@ -44,6 +65,8 @@ $ git clone https://github.com/app-generator/api-server-flask.git
4465
$ cd api-server-flask
4566
```
4667

68+
<br />
69+
4770
**Step #2** - create virtual environment using python3 and activate it (keep it outside our project directory)
4871

4972
```bash
@@ -56,12 +79,16 @@ $ # virtualenv env
5679
$ # .\env\Scripts\activate
5780
```
5881

82+
<br />
83+
5984
**Step #3** - Install dependencies in virtualenv
6085

6186
```bash
6287
$ pip install -r requirements.txt
6388
```
6489

90+
<br />
91+
6592
**Step #4** - setup `flask` command for our app
6693

6794
```bash
@@ -79,25 +106,15 @@ $ (Powershell) $env:FLASK_APP = ".\run.py"
79106
$ (Powershell) $env:FLASK_ENV = "development"
80107
```
81108

82-
**Step #5** - initialize database, check `run.py` for shell context
83-
84-
```bash
85-
$ flask shell
86-
>>> from api import db
87-
>>> db.create_all()
88-
```
109+
<br />
89110

90-
**Step #6** - start test APIs server at `localhost:5000`
111+
**Step #5** - start test APIs server at `localhost:5000`
91112

92-
```bash
93-
$ python run.py
94-
```
95-
or
96113
```bash
97114
$ flask run
98115
```
99116

100-
**Step #7** - use `flask-restx`' swagger dashboard to test APIs, or use `POSTMAN`
117+
Use the API via `POSTMAN` or Swagger Dashboard.
101118

102119
<br />
103120

@@ -166,15 +183,6 @@ authorization: JWT_TOKEN (returned by Login request)
166183

167184
<br />
168185

169-
## Modules
170-
171-
This application uses the following modules
172-
173-
- Flask==1.1.4
174-
- flask-restx==0.4.0
175-
- Flask-JWT-Extended
176-
- pytest
177-
178186
## Testing
179187

180188
Run tests using `pytest tests.py`

0 commit comments

Comments
 (0)