from webapp import application if __name__ == '__main__': # Added guard block to prevent multiple # instances of flask from running #app.run(host='0.0.0.0') application.run()
def runserver(): port = int(os.environ.get('PORT', 5000)) application.run(host='0.0.0.0', port=port, debug=True)
#!/usr/bin/env python3 # # This script will run the main application file in debug mode. # # author: Michael Gruber # # Adapted by Lucas Nadalete from sys import path import os.path path.append('src/main/python/') from helper.config_helper import ConfigHelper from webapp import application, APP_RESOURCE # Load server configuration helper = ConfigHelper(APP_RESOURCE) chost = helper.get_property_by_section('server', 'inova.host') cport = int(helper.get_property_by_section('server', 'inova.port')) cdebug = bool(helper.get_property_by_section('server', 'inova.debug')) # Start Web Server for all hosts, ssl_context=('cert.pem', 'key.pem') if __name__ == "__main__": application.run(host=chost, debug=cdebug, port=cport)
# Run this with python web.py, it points to the webapp.__init__.py file for \ # instantiation of the web application. import os import signal from webapp import application def signal_handler(sig, frame): os._exit(0) signal.signal(signal.SIGINT, signal_handler) if __name__ == '__main__': # main cassidy app # debug=True will start two bm_threads application.run(debug=True, threaded=True, host='0.0.0.0') """ TODO: users can be part of teams users can create products products are also part of teams product has an arrangement """
from webapp import application print 'not here' print application.config['DEBUG'] # run the app. if __name__ == "__main__": application.run(debug=application.config['DEBUG'])