Skip to content

Commit 5e5f19d

Browse files
committed
docs(deploy): added info about required DOMAIN env var
1 parent 46466b1 commit 5e5f19d

File tree

1 file changed

+48
-38
lines changed

1 file changed

+48
-38
lines changed

readme.md

Lines changed: 48 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
## Example project
66

7-
Generated with defaults: http://fullstack-demo.herokuapp.com/.
7+
Generated with defaults: http://fullstack-demo.herokuapp.com/.
88

99
Source code: https://github.com/DaftMonk/fullstack-demo
1010

@@ -43,13 +43,13 @@ Run `grunt` for building, `grunt serve` for preview, and `grunt serve:dist` for
4343
**Server**
4444

4545
* Database: `None`, `MongoDB`
46-
* Authentication boilerplate: `Yes`, `No`
47-
* oAuth integrations: `Facebook` `Twitter` `Google`
46+
* Authentication boilerplate: `Yes`, `No`
47+
* oAuth integrations: `Facebook` `Twitter` `Google`
4848
* Socket.io integration: `Yes`, `No`
4949

5050
## Injection
5151

52-
A grunt task looks for new files in your `client/app` and `client/components` folder and automatically injects them in the appropriate places based on an injection block.
52+
A grunt task looks for new files in your `client/app` and `client/components` folder and automatically injects them in the appropriate places based on an injection block.
5353

5454
* `less` files into `client/app.less`
5555
* `scss` files into `client/app.scss`
@@ -62,7 +62,7 @@ A grunt task looks for new files in your `client/app` and `client/components` fo
6262

6363
Available generators:
6464

65-
* App
65+
* App
6666
- [angular-fullstack](#app) (aka [angular-fullstack:app](#app))
6767
* Server Side
6868
- [angular-fullstack:endpoint](#endpoint)
@@ -80,7 +80,7 @@ Available generators:
8080
- [angular-fullstack:heroku](#heroku)
8181

8282
### App
83-
Sets up a new AngularJS + Express app, generating all the boilerplate you need to get started.
83+
Sets up a new AngularJS + Express app, generating all the boilerplate you need to get started.
8484

8585
Example:
8686
```bash
@@ -98,7 +98,7 @@ yo angular-fullstack:endpoint message
9898
```
9999

100100
Produces:
101-
101+
102102
server/api/message/index.js
103103
server/api/message/message.spec.js
104104
server/api/message/message.controller.js
@@ -116,13 +116,13 @@ yo angular-fullstack:route myroute
116116
```
117117

118118
Produces:
119-
119+
120120
client/app/myroute/myroute.js
121121
client/app/myroute/myroute.controller.js
122122
client/app/myroute/myroute.controller.spec.js
123123
client/app/myroute/myroute.html
124124
client/app/myroute/myroute.scss
125-
125+
126126

127127
### Controller
128128
Generates a controller.
@@ -133,7 +133,7 @@ yo angular-fullstack:controller user
133133
[?] Where would you like to create this controller? client/app/
134134
```
135135

136-
Produces:
136+
Produces:
137137

138138
client/app/user/user.controller.js
139139
client/app/user/user.controller.spec.js
@@ -178,7 +178,7 @@ yo angular-fullstack:filter myFilter
178178
[?] Where would you like to create this filter? client/app/
179179
```
180180

181-
Produces:
181+
Produces:
182182

183183
client/app/myFilter/myFilter.filter.js
184184
client/app/myFilter/myFilter.filter.spec.js
@@ -209,10 +209,10 @@ yo angular-fullstack:decorator serviceName
209209
[?] Where would you like to create this decorator? client/app/
210210
```
211211

212-
Produces
212+
Produces
213213

214214
client/app/serviceName/serviceName.decorator.js
215-
215+
216216
###Openshift
217217

218218
Deploying to OpenShift can be done in just a few steps:
@@ -223,29 +223,37 @@ A live application URL will be available in the output.
223223

224224
> **Enabling web sockets**
225225
>
226-
> If you're using socket.io, you will need to update the client to connect to the correct port for sockets to work.
227-
>
226+
> If you're using socket.io, you will need to update the client to connect to the correct port for sockets to work.
227+
>
228228
> In `/client/app/components/socket/socket.service` update the socket to connect to port 8000. (with `my-openshift-app` being the deployed name of your app):
229229
>
230230
> var ioSocket = io.connect('my-openshift-app.com:8000');
231-
>
231+
>
232232
> **oAuth**
233233
>
234234
> 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 :
235-
>
235+
>
236236
> rhc set-env FACEBOOK_ID=id -a my-openshift-app
237237
> rhc set-env FACEBOOK_SECRET=secret -a my-openshift-app
238-
>
239-
> You will also need to update the callback urls for your oAuth strategies in your `server/config/environment/index.js`
240238
>
241-
> After you've set the required environment variables, restart the server:
242-
>
239+
> You will also need to set `DOMAIN` environment variable:
240+
>
241+
> rhc config:set DOMAIN=<your-openshift-app-name>.rhcloud.com
242+
>
243+
> # or (if you're using it):
244+
>
245+
> rhc config:set DOMAIN=<your-custom-domain>
246+
>
247+
> After you've set the required environment variables, restart the server:
248+
>
243249
> rhc app-restart -a my-openshift-app
244-
250+
251+
To make your deployment process easier consider using [grunt-build-control](https://github.com/robwierzbowski/grunt-build-control).
252+
245253
**Pushing Updates**
246254

247255
grunt
248-
256+
249257
Commit and push the resulting build, located in your dist folder:
250258

251259
cd dist && git add -A && git commit -m "describe your changes here"
@@ -255,36 +263,38 @@ Commit and push the resulting build, located in your dist folder:
255263

256264
Deploying to heroku only takes a few steps.
257265

258-
yo angular-fullstack:heroku
266+
yo angular-fullstack:heroku
259267

260268
To work with your new heroku app using the command line, you will need to run any `heroku` commands from the `dist` folder.
261269

270+
262271
If you're using mongoDB you will need to add a database to your app:
263272

264273
heroku addons:add mongohq
265274

266-
Your app should now be live. To view it run `heroku open`
275+
Your app should now be live. To view it run `heroku open`.
267276

268-
> **Enabling web sockets**
269277
>
270-
> If you're using socket.io you will need to enable websockets on your app:
271-
>
272-
> heroku labs:enable websockets
273-
>
274-
> **oAuth**
278+
> 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 :
275279
>
276-
> 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 :
277-
>
278280
> heroku config:set FACEBOOK_ID=id
279281
> heroku config:set FACEBOOK_SECRET=secret
280282
>
281-
> You will also need to update the callback urls for your oAuth strategies in your `server/config/environment/index.js`
283+
> You will also need to set `DOMAIN` environment variable:
284+
>
285+
> heroku config:set DOMAIN=<your-heroku-app-name>.herokuapp.com
286+
>
287+
> # or (if you're using it):
288+
>
289+
> heroku config:set DOMAIN=<your-custom-domain>
282290
>
283291
292+
To make your deployment process easier consider using [grunt-build-control](https://github.com/robwierzbowski/grunt-build-control).
293+
284294
#### Pushing Updates
285295

286296
grunt
287-
297+
288298
Commit and push the resulting build, located in your dist folder:
289299

290300
cd dist && git add -A && git commit -m "describe your changes here"
@@ -332,7 +342,7 @@ Use `grunt test:client` to only run client tests.
332342

333343
**Protractor tests**
334344

335-
To setup protractor e2e tests, you must first run
345+
To setup protractor e2e tests, you must first run
336346

337347
`npm run update-webdriver`
338348

@@ -348,9 +358,9 @@ Overview
348358

349359
├── client
350360
│   ├── app - All of our app specific components go in here
351-
│   ├── assets - Custom assets: fonts, images, etc…
361+
│   ├── assets - Custom assets: fonts, images, etc…
352362
│   ├── components - Our reusable components, non-specific to to our app
353-
363+
354364
├── e2e - Our protractor end to end tests
355365
356366
└── server

0 commit comments

Comments
 (0)