I'm using python bottle framework with paste as the web server. Here is my initialization code:
bottle.run(port=os.getenv('SERVER_PORT'), host=os.getenv('SERVER_HOST'), server='paste')
I want to shutdown the bottle server by command by sending a request:
@bottle.get("/suicide")
def KilleMe():
pass
I have no idea what to write in the function body. Please help!
p.s: I saw some answers (some anwer) but wasn't able to combine them in my code....