risotto/script/server.py

13 lines
277 B
Python
Raw Normal View History

2019-12-02 10:29:40 +01:00
from asyncio import get_event_loop
2019-11-28 14:50:53 +01:00
from risotto import get_app
2020-01-30 16:22:06 +01:00
2019-11-28 14:50:53 +01:00
if __name__ == '__main__':
2019-12-02 10:29:40 +01:00
loop = get_event_loop()
loop.run_until_complete(get_app(loop))
try:
2020-03-16 15:19:29 +01:00
print('HTTP server ready')
2019-12-02 10:29:40 +01:00
loop.run_forever()
except KeyboardInterrupt:
pass