Skip to content

Commit 5d9b2ed

Browse files
committed
docs(generators:heroku): create heroku.md
[skip ci]
1 parent 5f1bf13 commit 5d9b2ed

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

docs/generators/heroku.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
### Heroku
2+
3+
Deploying to heroku only takes a few steps.
4+
5+
yo angular-fullstack:heroku
6+
7+
To work with your new heroku app using the command line, you will need to run any `heroku` commands from the `dist` folder.
8+
9+
10+
If you're using mongoDB you will need to add a database to your app:
11+
12+
heroku addons:create mongolab
13+
14+
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:
15+
```
16+
options: {
17+
db: {
18+
safe: true,
19+
replset: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } },
20+
server: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } }
21+
}
22+
}
23+
```
24+
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.
25+
26+
27+
Your app should now be live. To view it run `heroku open`.
28+
29+
>
30+
> 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 :
31+
>
32+
> heroku config:set FACEBOOK_ID=id
33+
> heroku config:set FACEBOOK_SECRET=secret
34+
>
35+
> You will also need to set `DOMAIN` environment variable:
36+
>
37+
> heroku config:set DOMAIN=<your-heroku-app-name>.herokuapp.com
38+
>
39+
> # or (if you're using it):
40+
>
41+
> heroku config:set DOMAIN=<your-custom-domain>
42+
>
43+
44+
> WARNING: Deployment is untested with Gulp
45+
46+
To make your deployment process easier consider using [grunt-build-control](https://github.com/robwierzbowski/grunt-build-control).
47+
48+
#### Pushing Updates
49+
50+
grunt
51+
52+
Commit and push the resulting build, located in your dist folder:
53+
54+
grunt buildcontrol:heroku

0 commit comments

Comments
 (0)