blob: 30f5ea5e5b3487c36867ccccccfcd9d086d6bae2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
from flask.ext.script import Manager, Server
from pastebin import app, db
manager = Manager(app)
@manager.command
def initdb():
"""Creates all database tables."""
db.create_all()
@manager.command
def dropdb():
"""Drops all database tables."""
db.drop_all()
manager.add_command('server', Server(host='0.0.0.0', port=9200))
if __name__ == '__main__':
manager.run()
|