''' 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)
#!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)
#!flask/bin/python from app import myapp myapp.run(debug=True, host='0.0.0.0', port=5001)
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)
#!flask/bin/python from app import myapp myapp.run(debug=True, host='0.0.0.0')
from app import myapp if __name__ == "__main__": myapp.run()
from app import myapp myapp.debug = True myapp.run(port=8090)
#!flask/bin/python from app import myapp myapp.run(debug=True,host='0.0.0.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)
#!flask/bin/python from app import myapp myapp.run(debug=False)
#!flask/bin/python from app import myapp myapp.run(debug=True)
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
# 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')
#!flask/bin/python from app import myapp myapp.run(debug=True,host='0.0.0.0', port=5001)
#!/usr/bin/env python import imp import os import sys, logging from app import myapp if __name__ == '__main__': myapp.run()
from app import myapp if __name__ == '__main__': myapp.run(debug=True, port=888, host='0.0.0.0')