forked from gbtami/now-ui-dashboard-flask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
31 lines (24 loc) · 813 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# -*- encoding: utf-8 -*-
"""
Flask Web App - Generated by www.AppSeed.us
AppSeed - developed by RoSoft | www.RoSoftware.ro
Licence: MIT
"""
import os
from app import app #import flask app
from app import db #import db
from app import admin
from app.cli import create_user #import cli functions
#----------------------------------------
# launch
#----------------------------------------
# This Code will be executed if app is started using python:
# python ./app.py
if __name__ == "__main__":
# schema it's created based on classes defined in models.py
db.create_all()
# create a test user using
# create_user( email, username, password)
create_user( '[email protected]', 'appseed', 'pass')
port = int(os.environ.get("PORT", 5000))
app.run(host='127.0.0.1', port=port, debug=True)