Open mwigham opened 7 months ago
I came across this issue. For your information, this is my launch.json configuration to run the server conveniently from within VScode (using the option "Run LOD server using Poetry"
)
launch.json beng-lod-server.
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Flask (development mode)",
"type": "debugpy",
"request": "launch",
"module": "flask",
"env": {
"FLASK_APP": "src/server.py",
"FLASK_ENV": "development"
},
"args": [
"run"
],
"jinja": true
},
{
"name": "Run LOD server using Poetry",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}",
"module": "flask",
"python": "/home/wmelder/.cache/pypoetry/virtualenvs/beng-lod-server-S8FBxdzC-py3.11/bin/python3",
"env": {
"FLASK_APP": "src/server.py"
},
"args": [
"run"
],
"jinja": true
},
{
"name": "Python: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
}
]
}
Please point out what needs to be different to bring it in line with other APIs.
Our newer APIs don't use server.py any more due to an update of Flask (see linked issue in the top comment).
During review of a labs-userspace-api issue, a feedback point was that this is started differently to beng-lod-server. Checking with Jaap, this is required by Flask after certain updates. beng-lod-server should therefore be updated to bring it in line with other O-team APIs, so that all Flask applications are run the same way.