2014-01-14 01:07:13 +02:00
|
|
|
from gevent import wsgi
|
2013-12-09 22:24:22 +02:00
|
|
|
from realms import config, app, manager
|
2013-12-03 22:09:57 +02:00
|
|
|
|
2013-09-26 16:51:15 +03:00
|
|
|
|
2013-12-09 22:24:22 +02:00
|
|
|
@manager.command
|
|
|
|
def server(port=10000):
|
|
|
|
print "Server started (%s)" % config.ENV
|
|
|
|
wsgi.WSGIServer(('', int(port)), app).serve_forever()
|
|
|
|
|
2014-01-14 01:07:13 +02:00
|
|
|
|
|
|
|
@manager.command
|
|
|
|
def init_db():
|
|
|
|
from realms import db
|
|
|
|
import realms.models
|
|
|
|
print "Init DB"
|
|
|
|
db.drop_all()
|
|
|
|
db.create_all()
|
|
|
|
|
2013-09-26 16:51:15 +03:00
|
|
|
if __name__ == '__main__':
|
2013-12-09 22:24:22 +02:00
|
|
|
manager.run()
|