2022-12-05 01:37:14 +00:00
|
|
|
from flask import Flask, make_response
|
2022-12-04 11:59:12 +00:00
|
|
|
from socketify import WSGI
|
|
|
|
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
|
|
|
@app.route('/')
|
|
|
|
def index():
|
2022-12-05 01:37:14 +00:00
|
|
|
"""Test 6: Plaintext"""
|
|
|
|
response = make_response(b"Hello, World!")
|
|
|
|
response.content_type = "text/plain"
|
|
|
|
return response
|
2022-12-04 11:59:12 +00:00
|
|
|
|
2022-12-05 01:37:14 +00:00
|
|
|
|
|
|
|
WSGI(app).listen(8000, lambda config: print(f"Listening on port http://localhost:{config.port} now\n")).run()
|
2022-12-04 11:59:12 +00:00
|
|
|
|