wireguard_peer_manager/kiss/toml-manager/app.py

19 lines
500 B
Python

import cherrypy
from config.config_loader import load_config
from controllers.wireguard_controller import WireGuardController
def start_server():
config = load_config()
cherrypy.config.update({
'server.socket_host': config['server']['host'],
'server.socket_port': config['server']['port'],
})
cherrypy.tree.mount(WireGuardController(), '/api/wireguard')
cherrypy.engine.start()
cherrypy.engine.block()
if __name__ == "__main__":
start_server()