blob: e255ef08fde2e382605420d41283d6f24e45529b [file] [log] [blame]
#!/usr/bin/env python3
import ahapi
import asyncio
httpserver = ahapi.simple(
api_dir="/opt/dlstats/scripts", # serve api end points from here
static_dir="/opt/dlstats/htdocs", # serve stuff like html and images from here
bind_ip="127.0.0.1",
bind_port=8082,
state={"something": "stateful"}
)
loop = asyncio.get_event_loop()
loop.run_until_complete(httpserver.loop())