]>
git.frykholm.com Git - friends.git/blob - friends/server.py
adddf23bbe5b5f8df9de56b656a0d52dc0694dcb
4 import tornado
.httpserver
5 class XrdHandler(tornado
.web
.RequestHandler
):
7 self
.render("templates/xrd.xml", hostname
="ronin.local", url
="https://ronin.local")
9 class UserHandler(tornado
.web
.RequestHandler
):
11 #user = self.get_argument("user")
12 self
.render("templates/user.xml", user
=user
)
14 application
= tornado
.web
.Application([
15 (r
"/.well-known/host-meta", XrdHandler
),
16 (r
"/user/(.+)", UserHandler
),
20 srv
= tornado
.httpserver
.HTTPServer(application
, ssl_options
={
21 "certfile": "ronin.local.pem",
22 "keyfile": "ronin.local.key",
26 if __name__
== "__main__":
28 tornado
.ioloop
.IOLoop
.instance().start()