Commits

Fernando G N Rocha committed 28b27f4

Melhor apresentação heroku

  • Participants
  • Parent commits a1e9a4a

Comments (0)

Files changed (3)

deploy/img/appfog4.png

Old
Old image
New
New image

deploy/img/hello_heroku.png

Added
New image

deploy/index.html

 				<section>
 					<section>
                         <h1>Heroku</h1>
-                        <!-- TODO: Mostrar código da app em flask -->
+
+                        <p>app.py</p>
                         <pre class="fragment"><code contenteditable>
+import os
+from flask import Flask
+
+app = Flask(__name__)
+
+@app.route('/')
+def hello():
+    return 'Hello World!'
+
+if __name__ == '__main__':
+    # Bind to PORT if defined, otherwise default to 5000.
+    port = int(os.environ.get('PORT', 5000))
+    app.run(host='0.0.0.0', port=port)
+
+                        </code></pre>
+					</section>
+					<section>
+                        <pre><code contenteditable>
+    $ git init && git add && git commit -m "init"
+
     $ heroku login
     $ heroku create
+
+    $ pip install Flask
     $ pip freeze > requirements.txt
+
     $ git push heroku master
                             </code><small class="">Siga o <a target="_blank" href="https://devcenter.heroku.com/articles/python">tutorial completo</a></small></pre>
+
+                            <span class="fragment"><img src="img/hello_heroku.png" /></span>
 					</section>
 
                     <section>