-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathrw_api.py
More file actions
executable file
·30 lines (22 loc) · 834 Bytes
/
Copy pathrw_api.py
File metadata and controls
executable file
·30 lines (22 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env python
# this include has to go first so ZMQ can steal IOLoop installation from Tornado
import libs.zeromq
import argparse
import sys
import api.server
import libs.config
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Rainwave API server.")
parser.add_argument("--config", default=None)
args = parser.parse_args()
libs.config.load(args.config)
# Loading all the API requests needs to come after loading the config,
# as some handlers set their URLs dependent on configuration values.
# pylint: disable=W0614,W0401
from api_requests import *
from api_requests.admin import *
from api_requests.admin_web import *
from api_requests.auth import *
# pylint: enable=W0614,W0401
server = api.server.APIServer()
sys.exit(server.start())