Skip to content

Commit

Permalink
Fixing structure of app.
Browse files Browse the repository at this point in the history
  • Loading branch information
Faerbit committed Jun 22, 2015
1 parent a088354 commit a1474eb
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -58,3 +58,6 @@ target/

# Virtualenv
virtualenv/

# debug database
debug.db
2 changes: 1 addition & 1 deletion Procfile
@@ -1 +1 @@
web: gunicorn todo.main:app --log-file -
web: gunicorn todo:app --log-file -
7 changes: 7 additions & 0 deletions run_debug_server.py
@@ -0,0 +1,7 @@
#!/usr/bin/env python3
from todo import app
from todo.database import init_db

if __name__ == "__main__":
init_db()
app.run(debug=True, threaded=True)
2 changes: 1 addition & 1 deletion todo/__init__.py
Expand Up @@ -2,7 +2,7 @@
from flask import Flask
from flask.ext.cors import CORS

DATABASE=os.getenv("DATABASE_URL", "sqlite://")
DATABASE=os.getenv("DATABASE_URL", "sqlite:///debug.db")
DATABASE=DATABASE.strip()

app = Flask(__name__)
Expand Down
2 changes: 1 addition & 1 deletion todo/database.py
@@ -1,4 +1,4 @@
from todo.main import app
from todo import app

from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
Expand Down
5 changes: 0 additions & 5 deletions todo/main.py

This file was deleted.

0 comments on commit a1474eb

Please sign in to comment.