Commit c11e3d8e authored by Tim Brooks's avatar Tim Brooks
Browse files

Produce a development server entry_point

parent de9af63b
......@@ -100,10 +100,6 @@ def get_image(file_name):
APP.logger.info("Rendering %s done", name)
return send_from_directory(APP.config['RENDER_FOLDER'], file_name)
if __name__ == "__main__":
APP.debug = True
APP.run(host='0')
from logging import Formatter
TEMPLATE = "[%(asctime)s|%(levelname)-7s] %(message)s"
......@@ -111,3 +107,11 @@ APP.logger.setLevel(logging.DEBUG)
for handler in APP.logger.handlers:
handler.setLevel(logging.DEBUG)
handler.setFormatter(Formatter(TEMPLATE))
def serve():
"""Standalone development server on port 5000"""
APP.debug = True
APP.run(host='0')
if __name__ == "__main__":
serve()
......@@ -37,12 +37,10 @@ setup(name='mcviz.web',
'flask',
'werkzeug',
],
data_files=[('log', []),
('uploads', []),
('renders', []),
('templates', ['templates/base.html',
data_files=[('templates', ['templates/base.html',
'templates/main.html',
'templates/render.html',
]),
],
entry_points={"console_scripts" : ["mcwebviz = mcviz.web.app:serve"]},
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment