import os
from flask import Flask
from model.base import db
from route.base import blueprint

# Register models and routes
import model
import route

app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://' + os.environ['USER'] + ':' +\
                                         os.environ['PASSWORD'] + '@' +\
                                        'db/' + os.environ['SCHEMA']

db.init_app(app)

with app.test_request_context():
    db.create_all()
    db.session.commit()

app.register_blueprint(blueprint)

if __name__ == '__main__':
    app.run(host='0.0.0.0', debug=True)

@@ -291,17 +291,16 @@
         
- 
 os.envir
@@ -524,16 +524,147 @@
 print)%0A%0A
+@app.after_request%0Adef after_request(response):%0A    response.headers.add('Access-Control-Allow-Origin', '*')%0A    return response%0A%0A%0A
 if __nam

allow CORS