-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_api.py
More file actions
48 lines (40 loc) · 960 Bytes
/
start_api.py
File metadata and controls
48 lines (40 loc) · 960 Bytes
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
import uvicorn
from api.app import app
if __name__ == "__main__":
# sur la VM
# uvicorn.run(app, host="0.0.0.0", port=5000)
# si vous avez comme erreur que le port 5000 est déjà utilisé,
# relancer le terminal sinon tentez uvicorn.run(app, host="0.0.0.0",
# port=5000).shutdown() avant relance
# sur son ordinateur personnel
uvicorn.run(app, host="0.0.0.0", port=80)
""" exemple post """
"""
RESTAURATEUR
{
"nom": "Delacroix",
"prenom": "Martin",
"identifiant": "CrossMartin",
"mot_de_passe": "CrossMartin",
"id_restaurant": "LTy9AUgMnLn8YS21KfFZ8g"
}
{
"nom": "Smith",
"prenom": "Leonard",
"identifiant": "TheSmith",
"mot_de_passe": "TheSmith",
"id_restaurant": "kFHkpnV7JI_P--xORaIazw"
}
"""
"""
CLIENT
{
"id_client": 0,
"nom": "Martin",
"prenom": "Alex",
"adresse": "4 rue de la soif",
"identifiant": "KingAlex35",
"mot_de_passe": "KingAlex35",
"telephone": "07.25.98.15.37"
}
"""