Julio Biason
11 years ago
3 changed files with 47 additions and 0 deletions
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env python |
||||
# -*- encoding: utf-8 -*- |
||||
|
||||
from flask import Flask |
||||
|
||||
import logging |
||||
|
||||
# ---------------------------------------------------------------------- |
||||
# Start up |
||||
# ---------------------------------------------------------------------- |
||||
|
||||
_log = logging.getLogger('lyrics') |
||||
|
||||
app = Flask(__name__) |
||||
|
||||
# ---------------------------------------------------------------------- |
||||
# Start as application |
||||
# ---------------------------------------------------------------------- |
||||
if __name__ == '__main__': |
||||
app.run() |
@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env python |
||||
# -*- encoding: utf-8 -*- |
||||
|
||||
from flask.ext.script import Manager |
||||
from flask.ext.script import Server |
||||
|
||||
from lyrics import app |
||||
|
||||
import logging |
||||
|
||||
# starts the logging service, always |
||||
if __name__ == '__main__': |
||||
logging.basicConfig(level=logging.DEBUG, |
||||
format='%(levelname)s:%(name)s ' |
||||
'[%(funcName)s:%(lineno)d]:%(message)s') |
||||
|
||||
|
||||
manager = Manager(app) |
||||
|
||||
manager.add_command('runserver', Server(use_debugger=True, |
||||
use_reloader=True)) |
||||
|
||||
if __name__ == '__main__': |
||||
manager.run() |
Loading…
Reference in new issue