# Path: app.py



import os
import sys
from flask import request
from app import app
# -*- coding: utf-8 -*-
"""
    utilities.shutdown_server
    ~~~~~~~~~~~~~~~~~~~~~~~~~

    Shutdown The Simple Server
    http://flask.pocoo.org/snippets/67/
"""

sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.dirname(__file__))))




def shutdown_server():
    func = request.environ.get('werkzeug.server.shutdown')
    if func is None:
        raise RuntimeError('Not running with the Werkzeug Server')
    func()



# Path: app.py



# Path: utilities/shutdown_server.py
import os
import sys
from flask import request
from app import app

# -*- coding: utf-8 -*-
"""
    utilities.shutdown_server
    ~~~~~~~~~~~~~~~~~~~~~~~~~

    Shutdown The Simple Server
    http://flask.pocoo.org/snippets/67/
"""

sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.dirname(__file__))))




def shutdown_server():
    func = request.environ.get('werkzeug.server.shutdown')
    if func is None:
        raise RuntimeError('Not running with the Werkzeug Server')
    func()



@app.route('/shutdown', methods=['GET', 'POST'])