Skip to content

Commit

Permalink
updated dev.py - now runs by ./dev.py <run|external>
Browse files Browse the repository at this point in the history
  • Loading branch information
xcash committed Jul 24, 2014
1 parent aaa7262 commit 8d7845f
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions dev.py
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit 8d7845f

Please sign in to comment.