You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-21Lines changed: 22 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,9 @@
2
2
3
3
Hello. Want to get started with Flask quickly? Good. You came to the right place. This Flask application framework is pre-configured with **Flask-SQLAlchemy**, **Flask-WTF**, **Fabric**, **Coverage**, and the **Bootstrap** frontend (among others). This will get your Flask app up and running on Heroku or PythonAnywhere quickly. Use this starter, boilerplate for all you new Flask projects. Cheers!
2. Login to Heroku and download the [Heroku Toolbelt](https://toolbelt.heroku.com/)
113
114
3. Once installed, open your command-line and run the following command - `heroku login`. Then follow the prompts:
114
115
115
-
```
116
+
```
116
117
Enter your Heroku credentials.
117
118
Email: michael@mherman.org
118
-
Password (typing will be hidden):
119
+
Password (typing will be hidden):
119
120
Could not find an existing public key.
120
121
Would you like to generate one? [Yn]
121
122
Generating new SSH public key.
@@ -129,7 +130,7 @@ Deploying to Heroku
129
130
```
130
131
web: python run.py
131
132
```
132
-
133
+
133
134
Then save the file in your applications root or main directory as *Procfile* (no extension). The word "web" indicates to Heroku that the application will be attached to the HTTP routing stack once deployed.
134
135
135
136
7. Create a local Git repository (if necessary):
@@ -145,21 +146,21 @@ Deploying to Heroku
145
146
```
146
147
$ heroku create <name_it_if_you_want>
147
148
```
148
-
149
+
149
150
9. Deploy your code to Heroku:
150
151
151
152
```
152
153
$ git push heroku master
153
154
```
154
-
155
+
155
156
10. View the app in your browser:
156
157
157
158
```
158
159
$ heroku open
159
160
```
160
161
161
162
11. You app should look similar to this - [http://www.flaskboilerplate.com/](http://www.flaskboilerplate.com/)
162
-
163
+
163
164
12. Having problems? Look at the Heroku error log:
164
165
165
166
```
@@ -168,26 +169,26 @@ Deploying to Heroku
168
169
169
170
### Deploying to PythonAnywhere
170
171
171
-
1. Install [Git](http://git-scm.com/downloads) and [Python](http://install.python-guide.org/) - if you don't already have them, of course.
172
+
1. Install [Git](http://git-scm.com/downloads) and [Python](http://install.python-guide.org/) - if you don't already have them, of course.
172
173
173
-
> If you plan on working exclusively within PythonAnywhere, which you can, because it provides a cloud solution for hosting and developing your application, you can skip step one entirely. :)
174
+
> If you plan on working exclusively within PythonAnywhere, which you can, because it provides a cloud solution for hosting and developing your application, you can skip step one entirely. :)
174
175
175
176
2. Sign up for [PythonAnywhere](https://www.pythonanywhere.com/pricing/), if you haven't already
176
177
3. Once logged in, you should be on the Consoles tab.
@@ -207,7 +208,7 @@ Once the web app has been created (it'll take 20 seconds or so), you'll see a li
207
208
from
208
209
209
210
```
210
-
project_home = u'/home/your-username/mysite'
211
+
project_home = u'/home/your-username/mysite'
211
212
```
212
213
213
214
to
@@ -227,7 +228,7 @@ Once the web app has been created (it'll take 20 seconds or so), you'll see a li
227
228
```
228
229
from app import app as application
229
230
```
230
-
231
+
231
232
12. Save the file.
232
233
13. Go to the website http://your-username.pythonanywhere.com/ (or your own domain if you specified a different one earlier), and you should see something like this - [http://www.flaskboilerplate.com/](http://www.flaskboilerplate.com/).
233
234
@@ -237,8 +238,8 @@ Once the web app has been created (it'll take 20 seconds or so), you'll see a li
237
238
238
239
1. Start a bash console
239
240
2. Run:
240
-
241
-
```
241
+
242
+
```
242
243
$ ssh-keygen -t rsa
243
244
```
244
245
@@ -257,7 +258,7 @@ Once the web app has been created (it'll take 20 seconds or so), you'll see a li
257
258
258
259
PUSH and PULL away!
259
260
260
-
### What's next?
261
+
### What's next?
261
262
262
263
1. Using Heroku? Make sure you deactivate your virtualenv once you're done deploying: `deactivate`
263
264
2. Need to reactivate? (1) Unix - `source venv/bin/activate` (2) Windows - `venv\scripts\activate`
0 commit comments