Skip to content

Instantly share code, notes, and snippets.

@minhoryang
Created August 20, 2019 05:19
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save minhoryang/dc73f2294ca3764a36856b0e860d0b27 to your computer and use it in GitHub Desktop.
Save minhoryang/dc73f2294ca3764a36856b0e860d0b27 to your computer and use it in GitHub Desktop.
FLASK with UDS(Unix Domain Socket)
# https://palletsprojects.com/p/flask/
from flask import Flask, escape, request
app = Flask(__name__)
@app.route('/')
def hello():
name = request.args.get("name", "World")
return f'Hello, {escape(name)}!'
Flask==1.1.1
Werkzeug==0.15.5
socat TCP-LISTEN:12346 UNIX-CONNECT:/tmp/test &
FLASK_APP=app.py flask run --host=unix:///tmp/test
@minhoryang
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment