Ejemplo n.º 1
0
'''
code adapted from 2016 FA INFO 290 TA project assignment
'''

#!flask/bin/python
from app import myapp
myapp.run(debug=True,host='0.0.0.0', port=8081)
Ejemplo n.º 2
0
#!flask/bin/python
import os
from app import myapp

port = int(os.environ.get('PORT', 5000))
myapp.run(debug=True, host='0.0.0.0', port=port)
Ejemplo n.º 3
0
#!flask/bin/python
from app import myapp
myapp.run(debug=True, host='0.0.0.0', port=5001)
Ejemplo n.º 4
0
    result = Result().SUCCESS(user)
    result_str = json.dumps(result, default=lambda o: o.__dict__, sort_keys=True, indent=4)
    return result_str


@myapp.route('/cv', methods=["POST"])
def saveCV():
    age = request.json.get("age")
    description = request.json.get("description")
    duration = request.json.get("duration")
    job = request.json.get("career")
    name = request.json.get("name")
    gender = request.json.get("gender")
    avatar = request.json.get("avatar")
    graduateFrom = request.json.get("graduateFrom")
    jobExp = request.json.get("jobExp")
    projectExp = request.json.get("projectExp")
    skill = request.json.get("skill")
    new_user = User(name, age, gender, avatar, description, duration, job, graduateFrom, jobExp, projectExp, skill)
    # TODO saveCV
    return "success"


@myapp.route('/')
@myapp.route('/index')
def index():
    return render_template('index.html')


myapp.run(host='0.0.0.0', debug=True)
Ejemplo n.º 5
0
#!flask/bin/python
from app import myapp
myapp.run(debug=True, host='0.0.0.0')
Ejemplo n.º 6
0
from app import myapp

if __name__ == "__main__":
    myapp.run()
Ejemplo n.º 7
0
from app import myapp

myapp.debug = True
myapp.run(port=8090)
Ejemplo n.º 8
0
#!flask/bin/python
from app import myapp
myapp.run(debug=True,host='0.0.0.0')
Ejemplo n.º 9
0
import os
from app import myapp, db
from app.models import User
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.script import Manager, Shell

manager = Manager(myapp)
migrate = Migrate(myapp, db)


def make_shell_context():
    return dict(app=app, db=db, User=User)


manager.add_command("shell", Shell(make_context=make_shell_context))
manager.add_command('db', MigrateCommand)

if __name__ == '__main__':
    myapp.run(debug=True)
Ejemplo n.º 10
0
#!flask/bin/python
from app import myapp
myapp.run(debug=False)
Ejemplo n.º 11
0
#!flask/bin/python
from app import myapp
myapp.run(debug=True)
Ejemplo n.º 12
0
import os
import sys
import subprocess

if __name__ == "__main__":
    # try:
    #     subprocess.check_output(['python', 'run-tests.py'])
    #     # run app if controll crosses without error
    #
    #     from app import myapp
    #     port = int(os.environ.get('PORT', 8090))
    #     myapp.debug = True
    #     myapp.run(host='0.0.0.0', port=port) #Start listening
    # except subprocess.CalledProcessError:
    #     sys.exit('failed tests...App not running...')
    from app import myapp
    port = int(os.environ.get('PORT', 8090))
    myapp.debug = True
    myapp.run(host='0.0.0.0', port=port)  #Start listening
Ejemplo n.º 13
0
# coding :utf-8

from app import myapp, db
from models import ClassRoom
import view

db.create_tables([ClassRoom], safe=True)
if __name__ == '__main__':
    myapp.run('0.0.0.0')
Ejemplo n.º 14
0
#!flask/bin/python
from app import myapp
myapp.run(debug=True,host='0.0.0.0', port=5001)
Ejemplo n.º 15
0
#!/usr/bin/env python
import imp
import os
import sys, logging
from app import myapp
if __name__ == '__main__':
	myapp.run()
Ejemplo n.º 16
0
from app import myapp

if __name__ == '__main__':
    myapp.run(debug=True, port=888, host='0.0.0.0')