]> git.mar77i.info Git - hublib/blob - hub/app.py
initial commit
[hublib] / hub / app.py
1 from argparse import ArgumentParser
2
3 from falcon.asgi import App
4 from falcon.constants import MEDIA_HTML
5
6 from .cryptresource import CryptResource
7
8
9 def get_app():
10 app = App(media_type=MEDIA_HTML)
11 ap = ArgumentParser()
12 ap.add_argument("--secret")
13 args = ap.parse_args()
14 cr = CryptResource(args.secret)
15 cr.register_on(app)
16 return app