diff --git a/dev.py b/dev.py index f949c88..fdabef6 100755 --- a/dev.py +++ b/dev.py @@ -1,11 +1,26 @@ #!/usr/bin/env python import sys +from flask.ext.script import Manager + from handler import app -if __name__ == '__main__': +manager = Manager(app) + + +@manager.command +def run(): print app.url_map - if 'external' in sys.argv[1:]: - app.run(host='0.0.0.0') - else: - app.run() + app.run() + +@manager.command +def runserver(): + run() + +@manager.command +def external(): + app.run(host='0.0.0.0') + + +if __name__ == '__main__': + manager.run() \ No newline at end of file