app.py 213 Bytes
Newer Older
Michal Pavlík's avatar
Michal Pavlík committed
1
from config import db, cnx
Michal Pavlík's avatar
Michal Pavlík committed
2
import models
Michal Pavlík's avatar
Michal Pavlík committed
3

Michal Pavlík's avatar
Michal Pavlík committed
4
# Create the database tables
Michal Pavlík's avatar
Michal Pavlík committed
5
with cnx.app.app_context():
Michal Pavlík's avatar
Michal Pavlík committed
6
    db.create_all()
Michal Pavlík's avatar
Michal Pavlík committed
7 8

if __name__ == '__main__':
Michal Pavlík's avatar
Michal Pavlík committed
9 10
    cnx.add_api('swagger.yml')
    cnx.run(debug=True, port=8080)