2019-01-19 09:13:36 +00:00
|
|
|
#!env/bin/python
|
|
|
|
|
|
|
|
import os
|
|
|
|
from botanjs.config import Config as config, DEBUG
|
|
|
|
from subprocess import Popen
|
|
|
|
from botanjs.service.webapi import WebAPI
|
|
|
|
|
|
|
|
SiteRoot = os.path.abspath( "." )
|
|
|
|
|
|
|
|
# Setting the SiteRoot for config
|
2021-09-05 15:16:37 +00:00
|
|
|
config["Paths"]["SiteRoot"] = SiteRoot
|
2019-01-19 09:13:36 +00:00
|
|
|
|
|
|
|
service = WebAPI(
|
|
|
|
jsCache = config["Paths"]["Cache"]
|
|
|
|
, jsRoot = config["BotanJS"]["SrcDir"]
|
|
|
|
, brokerURL = config["BotanJS"]["CeleryBroker"]
|
|
|
|
)
|
|
|
|
|
|
|
|
application = service.app
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2020-09-22 17:37:10 +00:00
|
|
|
application.config["DEBUG"] = DEBUG
|
|
|
|
application.run( host = config["Service"]["BindAddress"], port = config["Service"]["Port"] )
|