Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task: Modify beng-lod-server to start in the same way as other O-team APIs #481

Open
mwigham opened this issue Feb 23, 2024 · 2 comments
Open

Comments

@mwigham
Copy link
Contributor

mwigham commented Feb 23, 2024

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.

@wmelder
Copy link
Contributor

wmelder commented Jun 17, 2024

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.

@mwigham
Copy link
Contributor Author

mwigham commented Jun 17, 2024

Our newer APIs don't use server.py any more due to an update of Flask (see linked issue in the top comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants