Hypercorn must be started manually
Some checks are pending
Test web app / check (push) Waiting to run

This commit is contained in:
Nova Cat 2025-01-18 22:10:45 -08:00
parent 482b7b7438
commit ce4dd889d4

View file

@ -3,8 +3,6 @@ import asyncio, traceback, socket, ssl, zipfile, uuid, io, os
from OpenSSL import crypto
from urllib.parse import urlparse, quote
from flask import Flask, request, redirect, send_file, Response, make_response
from hypercorn.config import Config
from hypercorn.asyncio import serve
from pathlib import Path
homefolder = str(Path.home())
try:
@ -260,9 +258,4 @@ def relay():
title = "gemini://" + url
except:
code += "<pre>" + traceback.format_exc() + "</pre>"
return f'<!DOCTYPE html>\n<html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link rel="stylesheet" href="/style.css"><title>{title}</title></head><body>{code}</body></html>'
# Run the Hypercorn ASGI server
conf = Config()
conf.bind = ["0.0.0.0:2009", "[::]:2009"]
asyncio.run(serve(app, conf))
return f'<!DOCTYPE html>\n<html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link rel="stylesheet" href="/style.css"><title>{title}</title></head><body>{code}</body></html>'