-
Notifications
You must be signed in to change notification settings - Fork 3
/
schema.sh
49 lines (39 loc) · 828 Bytes
/
schema.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
mkdir myapp
cd myapp
mkdir app tests docs
touch .env README.md requirements.txt
cd app
mkdir api info models services utils
touch __init__.py database.py main.py
cd api
touch __init__.py
cd ..
cd info
touch __init__.py appconfig.py
cd ..
cd models
touch __init__.py
cd ..
cd services
touch __init__.py
cd ..
cd utils
touch __init__.py
cd ../..
cat << EOF >> README.md
Command to Run the FastAPI
STEP1: Create virtual environment
python3 -m venv fastapi-env
source fastapi-env/bin/activate
STEP2: Install the requirements inside the virtual environment
pip3 install -r requirements.txt
STEP3: To Run the project
uvicorn main:app --reload
STEP4: Swagger UI available in Below path after the app is started successfully
http://127.0.0.1:8000/docs
EOF
cat << EOF >> requirements.txt
fastapi
uvicorn
load_dotenv
EOF