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

flask run allows no way to run server on a unix socket #1938

Closed
stefanv opened this issue Jun 30, 2016 · 7 comments
Closed

flask run allows no way to run server on a unix socket #1938

stefanv opened this issue Jun 30, 2016 · 7 comments

Comments

@stefanv
Copy link

stefanv commented Jun 30, 2016

In our webapp, we deploy on a unix socket. We'd like to be able to do the same while debugging (since nginx etc. is already configured to handle that).

@ThiefMaster
Copy link
Member

ThiefMaster commented Jun 30, 2016

I don't think this really belongs in the Flask dev server. I recommend using a tool like socat to forward a unix socket to the normal socket.

@davidism
Copy link
Member

davidism commented Jun 30, 2016

The debugger is just a WSGI middleware, you can wrap your app with it and run with uWSGI.

from werkzeug.debug import DebuggedApplication
app.debug = True
app.wsgi_app = DebuggedApplication(app.wsgi_app, evalex=True)

http://werkzeug.pocoo.org/docs/0.11/debug/#enabling-the-debugger

@plockaby
Copy link

Would you accept a pull request implementing unix sockets in the Flask dev server?

@davidism
Copy link
Member

It's already merged in Werkzeug.

@plockaby
Copy link

You're saying that the ability to run the Flask dev server on a Unix socket is already in Werkzeug? I'm not finding that in the documentation.

@davidism
Copy link
Member

It's merged, not released.

@plockaby
Copy link

That's fantastic. Thank you for the information. I look forward to it.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants