updated environment
This commit is contained in:
parent
29419540de
commit
d130dc08b0
25
.vscode/launch.json
vendored
Normal file
25
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Python: Flask",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"module": "flask",
|
||||||
|
"env": {
|
||||||
|
"FLASK_APP": "BreCal",
|
||||||
|
"FLASK_DEBUG": "1"
|
||||||
|
},
|
||||||
|
"args": [
|
||||||
|
"run",
|
||||||
|
"--no-debugger",
|
||||||
|
"--no-reload"
|
||||||
|
],
|
||||||
|
"jinja": true,
|
||||||
|
"justMyCode": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -6,4 +6,8 @@ Projekt zur verbesserten Kommunikation der maritimen Partner bei Schiffsanläufe
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
Zum Debuggen der Flask App verwende ich dieses Tutorial:
|
||||||
|
https://code.visualstudio.com/docs/python/tutorial-flask#_create-a-project-environment-for-the-flask-tutorial
|
||||||
|
|
||||||
|
|||||||
BIN
docs/export_flask_project.png
Normal file
BIN
docs/export_flask_project.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@ -2,11 +2,19 @@
|
|||||||
|
|
||||||
## OpenAPI 3.0 Generated Flask project
|
## OpenAPI 3.0 Generated Flask project
|
||||||
|
|
||||||
|
The code was originally created by exporting the API from Postman. Selecting the API on the left (root element) the code generation icon becomes visible on the right.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
If the API gets updated I think it makes most sense to export again into a API helper branch and then merge this branch back into the project. Please do not forget to update the [index.yaml](../../misc/index.yaml) file.
|
||||||
|
The branch is named yaml_export.
|
||||||
|
|
||||||
All the routes are defined in 'project/api' folder.
|
All the routes are defined in 'project/api' folder.
|
||||||
Each route parses the request and calls the corresponding function in the 'project/impl' directory passing all the parameters and request body as function arguments.
|
Each route parses the request and calls the corresponding function in the 'project/impl' directory passing all the parameters and request body as function arguments.
|
||||||
|
|
||||||
To run this project:
|
To run this project:
|
||||||
```
|
|
||||||
|
```bash
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
export FLASK_APP='BreCal'
|
export FLASK_APP='BreCal'
|
||||||
export FLASK_ENV=development
|
export FLASK_ENV=development
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user