from intro_to_flask import app app.run(host='0.0.0.0', debug=True)
from intro_to_flask import app app.run('0.0.0.0', 8888,debug=True)
from intro_to_flask import app app.run(debug=True)
from intro_to_flask import app app.run(debug=True,use_reloader=True )
return render_template('home.html') @app.route('/about') def about(): return render_template('about.html') @app.route('/contact', methods=['GET', 'POST']) def contact(): form = ContactForm(request.form) if request.method == 'POST' and form.validate(): msg = Message(form.subject.data, sender='*****@*****.**', recipients=['*****@*****.**']) msg.body = """ From: %s <%s> %s """ % (form.name.data, form.email.data, form.message.data) mail.send(msg) return render_template('contact.html', success=True) else: print form.data return render_template('contact.html', form=form) if __name__ == '__main__': app.run(debug=True)
import os from intro_to_flask import app port = int(os.environ.get("PORT", 5000)) app.run(debug=True, host='0.0.0.0', port=port)
#if __name__ == '__main__': from intro_to_flask import app app.run(debug=True,host='0.0.0.0',port=9999)
import os from intro_to_flask import app port = int(os.environ.get("PORT", 3002)) app.run(debug=True, host='0.0.0.0', port=port)