-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
25 lines (18 loc) · 605 Bytes
/
main.py
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
import logging
from twisted.internet import reactor
from twisted.web.server import Site
from endpoints.root_endpoint import RootEndpoint
from tribler_data import TriblerData
import tribler_utils
def generate_tribler_data():
tribler_utils.tribler_data = TriblerData()
tribler_utils.tribler_data.generate()
logging.basicConfig()
logger = logging.getLogger(__file__)
logger.setLevel(logging.INFO)
logger.info("Generating random Tribler data")
generate_tribler_data()
site = Site(RootEndpoint())
logger.info("Starting fake Tribler API on port 8085")
reactor.listenTCP(8085, site)
reactor.run()