From de00bfed5c8ae96b70000a60565bd92f4bbdfa75 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sat, 19 Jan 2019 07:25:23 +0100 Subject: [PATCH] init --- requirements.txt | 2 ++ server.py | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 requirements.txt create mode 100644 server.py diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..384cf27 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +sanic +aiohttp diff --git a/server.py b/server.py new file mode 100644 index 0000000..d0d2410 --- /dev/null +++ b/server.py @@ -0,0 +1,13 @@ +from sanic import Sanic +from sanic.response import html + +app = Sanic() + + +@app.route("/") +async def test(request): + return html("You aren't really supposed to use this website using your browser.

It's a small server to check if a YunoHost instance can be reached by http before trying to instal a LE certificate.") + + +if __name__ == "__main__": + app.run(host="0.0.0.0", port=7000)