Skip to content

Commit 1bd29d5

Browse files
committed
docs (generators): Heroku generator run manually
Remove 'yo angular-fullstack:heroku' (not working) Update docs to reflect manual setup Fixes: angular-fullstack#1966, angular-fullstack#1950
1 parent 60684ba commit 1bd29d5

File tree

1 file changed

+33
-12
lines changed

1 file changed

+33
-12
lines changed

Diff for: docs/generators/heroku.md

+33-12
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,47 @@
11
### Heroku
22

3-
Deploying to heroku only takes a few steps.
3+
#### Setup
4+
You need a [Heroku](www.heroku.com) account and have the [Heroku Toolbelt](https://devcenter.heroku.com/articles/getting-started-with-nodejs#set-up) installed.
45

6+
Create an app on Heroku and give it a name (e.g. myapp) :
57
```
6-
yo angular-fullstack:heroku
8+
heroku apps:create myapp
79
```
10+
You can also use Heroku dashboard to create an app.
811

9-
To work with your new heroku app using the command line, you will need to run any `heroku` commands from the `dist` folder.
12+
If you're using mongoDB you will need to add a database to your app (e.g. [mlab](https://mlab.com/) or [compose](https://www.compose.com/mongodb)):
13+
Here we use mlab:
14+
```
15+
heroku addons:create mongolab
16+
```
1017

18+
Now, build your app by running:
19+
```
20+
gulp build
21+
```
22+
This creates a folder called `dist`.
1123

12-
If you're using mongoDB you will need to add a database to your app:
24+
Now go to `dist` and set it up as a git repository:
25+
```
26+
git init
27+
```
1328

29+
Add Heroku's app as your `dist` folder's remote repository:
1430
```
15-
heroku addons:create mongolab
31+
heroku git:remote -a myapp
1632
```
1733

18-
Note: if you get an `Error: No valid replicaset instance servers found` you need to modify moongose connection options in config/environment/production.js as follows:
34+
It is time to push your local repository to Heroku. From your app's root run:
35+
```
36+
gulp buildcontrol:heroku
37+
```
38+
39+
Your app should be live now. To view your app run:
40+
```
41+
heroku open
42+
```
43+
44+
Note on MongoDB setup: if you get an `Error: No valid replicaset instance servers found` you need to modify moongose connection options in config/environment/production.js as follows:
1945
```
2046
options: {
2147
db: {
@@ -25,10 +51,8 @@ options: {
2551
}
2652
}
2753
```
28-
One of the odd things about the Node driver is that the default timeout for replica set connections is only 1 second, so make sure you're setting it to something more like 30s like in this example.
29-
3054

31-
Your app should now be live. To view it run `heroku open`.
55+
One of the odd things about the Node driver is that the default timeout for replica set connections is only 1 second, so make sure you're setting it to something more like 30s like in this example.
3256

3357
>
3458
> If you're using any oAuth strategies, you must set environment variables for your selected oAuth. For example, if we're using **Facebook** oAuth we would do this :
@@ -47,16 +71,13 @@ Your app should now be live. To view it run `heroku open`.
4771
> ```
4872
>
4973
50-
To make your deployment process easier consider using [grunt-build-control](https://github.com/robwierzbowski/grunt-build-control).
51-
5274
#### Pushing Updates
5375
5476
```
5577
gulp build
5678
```
5779
5880
Commit and push the resulting build, located in your dist folder:
59-
6081
```
6182
gulp buildcontrol:heroku
6283
```

0 commit comments

Comments
 (0)