Skip to content

Commit d872f03

Browse files
committed
Get further now with curl and ipv6
1 parent 08257dd commit d872f03

File tree

5 files changed

+63
-14
lines changed

5 files changed

+63
-14
lines changed

Pipfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ aioquic = "*"
2323
psycopg-pool = "*"
2424
psycopg = {extras = ["binary"], version = "*"}
2525
jsonpickle = "*"
26-
hypercorn = {extras = ["asyncio", "h3"], version = "*"}
26+
hypercorn = {extras = ["h3"], version = "*"}
27+
quart-trio = "*"
2728

2829
[dev-packages]
2930
pytest-flask = "*"

Pipfile.lock

+49-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hypercorn.toml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
accesslog = "/var/log/hypercorn/access.log"
22
errorlog = "/var/log/hypercorn/errors.log"
3-
loglevel = "DEBUG"
4-
alt_svc_headers = ["h3=\":443\"; ma=86400"]
5-
bind = ["0.0.0.0:4433"]
6-
quic_bind = ["0.0.0.0:4433"]
7-
insecure_bind = ["0.0.0.0:8080"]
3+
loglevel = "DEBUG"
4+
alt_svc_headers = ["h3=\":4433\"; ma=86400"]
5+
#bind = "0.0.0.0:8443"
6+
quic_bind = ["0.0.0.0:4433", "[::]:4433"]
7+
#insecure_bind = "0.0.0.0:8080"
88
certfile = "/tmp/server.crt"
99
keyfile = "/tmp/server.key"
10-
#server_names = ["pythonrestapi"]
11-
worker_class = "asyncio"
12-
workers = 100
10+
server_names = ["hypercorn"]
11+
worker_class = "trio"
12+
#workers = 100

src/main.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def create_app() -> Quart:
4242
csrf = CSRFProtect(app)
4343
bcrypt.init_app(app)
4444
db.init_app(app)
45+
print(f"create_app() finished")
4546
return app
4647

4748
def liveness():
@@ -79,5 +80,5 @@ def readiness():
7980
raise HealthError(f"Failed to connect to the database! {app.config['POSTGRESQL_DATABASE_URI']}")
8081

8182
app = create_app()
82-
print(f"Running asyncio...")
83+
print(f"Running app...")
8384
#asyncio.run(serve(app, config), debug=True)

test/conftest.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ def client():
1515
@pytest.fixture(scope="function")
1616
async def app_context():
1717
config = Config()
18-
config.bind = ["localhost:4433"]
18+
config.bind = ["localhost:8443"]
1919
config.insecure_bind = ["localhost:8080"]
20+
config.quic_bind = ["localhost:4433"]
2021
config.worker_class = "asyncio"
2122
config.alt_svc_headers = ["h3=\":443\"; ma=3600, h3-29=\":443\"; ma=3600"]
2223
config.loglevel = "DEBUG"
23-
config.quic_bind = ["localhost:4433"]
2424
#app = create_app()
2525
#app = cors(app, allow_credentials=True, allow_origin="https://localhost:4433")
2626
#asyncio.run(serve(app, config))

0 commit comments

Comments
 (0)