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
Sets up a new AngularJS + Express app, generating all the boilerplate you need to get started.
@@ -84,83 +85,6 @@ Example:
84
85
```bash
85
86
yo angular-fullstack
86
87
```
87
-
###Openshift
88
-
89
-
Deploying to OpenShift can be done in just a few steps:
90
-
91
-
yo angular-fullstack:openshift
92
-
93
-
A live application URL will be available in the output.
94
-
95
-
> **Enabling web sockets**
96
-
>
97
-
> If you're using socket.io, you will need to update the client to connect to the correct port for sockets to work.
98
-
>
99
-
> 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):
100
-
>
101
-
> var ioSocket = io.connect('my-openshift-app.com:8000');
102
-
>
103
-
> **oAuth**
104
-
>
105
-
> 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 :
106
-
>
107
-
> rhc set-env FACEBOOK_ID=id -a my-openshift-app
108
-
> rhc set-env FACEBOOK_SECRET=secret -a my-openshift-app
109
-
>
110
-
> You will also need to update the callback urls for your oAuth strategies in your `server/config/environment/index.js`
111
-
>
112
-
> After you've set the required environment variables, restart the server:
113
-
>
114
-
> rhc app-restart -a my-openshift-app
115
-
116
-
**Pushing Updates**
117
-
118
-
grunt
119
-
120
-
Commit and push the resulting build, located in your dist folder:
121
-
122
-
cd dist && git add -A && git commit -m "describe your changes here"
123
-
git push -f my-openshift-app master
124
-
125
-
### Heroku
126
-
127
-
Deploying to heroku only takes a few steps.
128
-
129
-
yo angular-fullstack:heroku
130
-
131
-
To work with your new heroku app using the command line, you will need to run any `heroku` commands from the `dist` folder.
132
-
133
-
If you're using mongoDB you will need to add a database to your app:
134
-
135
-
heroku addons:add mongohq
136
-
137
-
Your app should now be live. To view it run `heroku open`
138
-
139
-
> **Enabling web sockets**
140
-
>
141
-
> If you're using socket.io you will need to enable websockets on your app:
142
-
>
143
-
> heroku labs:enable websockets
144
-
>
145
-
> **oAuth**
146
-
>
147
-
> 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 :
148
-
>
149
-
> heroku config:set FACEBOOK_ID=id
150
-
> heroku config:set FACEBOOK_SECRET=secret
151
-
>
152
-
> You will also need to update the callback urls for your oAuth strategies in your `server/config/environment/index.js`
153
-
>
154
-
155
-
#### Pushing Updates
156
-
157
-
grunt
158
-
159
-
Commit and push the resulting build, located in your dist folder:
160
-
161
-
cd dist && git add -A && git commit -m "describe your changes here"
162
-
git push -f heroku master
163
-
164
88
165
89
### Endpoint
166
90
Generates a new API endpoint.
@@ -287,6 +211,84 @@ yo angular-fullstack:decorator serviceName
287
211
Produces
288
212
289
213
client/app/serviceName/serviceName.decorator.js
214
+
215
+
###Openshift
216
+
217
+
Deploying to OpenShift can be done in just a few steps:
218
+
219
+
yo angular-fullstack:openshift
220
+
221
+
A live application URL will be available in the output.
222
+
223
+
> **Enabling web sockets**
224
+
>
225
+
> If you're using socket.io, you will need to update the client to connect to the correct port for sockets to work.
226
+
>
227
+
> 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):
228
+
>
229
+
> var ioSocket = io.connect('my-openshift-app.com:8000');
230
+
>
231
+
> **oAuth**
232
+
>
233
+
> 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 :
234
+
>
235
+
> rhc set-env FACEBOOK_ID=id -a my-openshift-app
236
+
> rhc set-env FACEBOOK_SECRET=secret -a my-openshift-app
237
+
>
238
+
> You will also need to update the callback urls for your oAuth strategies in your `server/config/environment/index.js`
239
+
>
240
+
> After you've set the required environment variables, restart the server:
241
+
>
242
+
> rhc app-restart -a my-openshift-app
243
+
244
+
**Pushing Updates**
245
+
246
+
grunt
247
+
248
+
Commit and push the resulting build, located in your dist folder:
249
+
250
+
cd dist && git add -A && git commit -m "describe your changes here"
251
+
git push -f my-openshift-app master
252
+
253
+
### Heroku
254
+
255
+
Deploying to heroku only takes a few steps.
256
+
257
+
yo angular-fullstack:heroku
258
+
259
+
To work with your new heroku app using the command line, you will need to run any `heroku` commands from the `dist` folder.
260
+
261
+
If you're using mongoDB you will need to add a database to your app:
262
+
263
+
heroku addons:add mongohq
264
+
265
+
Your app should now be live. To view it run `heroku open`
266
+
267
+
> **Enabling web sockets**
268
+
>
269
+
> If you're using socket.io you will need to enable websockets on your app:
270
+
>
271
+
> heroku labs:enable websockets
272
+
>
273
+
> **oAuth**
274
+
>
275
+
> 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 :
276
+
>
277
+
> heroku config:set FACEBOOK_ID=id
278
+
> heroku config:set FACEBOOK_SECRET=secret
279
+
>
280
+
> You will also need to update the callback urls for your oAuth strategies in your `server/config/environment/index.js`
281
+
>
282
+
283
+
#### Pushing Updates
284
+
285
+
grunt
286
+
287
+
Commit and push the resulting build, located in your dist folder:
288
+
289
+
cd dist && git add -A && git commit -m "describe your changes here"
290
+
git push -f heroku master
291
+
290
292
291
293
## Bower Components
292
294
@@ -319,41 +321,6 @@ Yeoman generated projects can be further tweaked according to your needs by modi
319
321
320
322
A `.yo-rc` file is generated for helping you copy configuration across projects, and to allow you to keep track of your settings. You can change this as you see fit.
Running `grunt test` will run the client and server unit tests with karma and mocha.
@@ -374,6 +341,43 @@ Use `grunt test:e2e` to have protractor go through tests located in the `e2e` fo
374
341
375
342
Keeping your app secrets and other sensitive information in source control isn't a good idea. To have grunt launch your app with specific environment variables, add them to the git ignored environment config file: `server/config/local.env.js`.
376
343
344
+
## Project Structure
345
+
346
+
Overview
347
+
348
+
├── client
349
+
│ ├── app - All of our app specific components go in here
350
+
│ ├── assets - Custom assets: fonts, images, etc…
351
+
│ ├── components - Our reusable components, non-specific to to our app
352
+
│
353
+
├── e2e - Our protractor end to end tests
354
+
│
355
+
└── server
356
+
├── api - Our apps server api
357
+
├── auth - For handling authentication with different auth strategies
358
+
├── components - Our reusable or app-wide components
359
+
├── config - Where we do the bulk of our apps configuration
360
+
│ └── local.env.js - Keep our environment variables out of source control
361
+
│ └── environment - Configuration specific to the node environment
362
+
└── views - Server rendered views
363
+
364
+
An example client component in `client/app`
365
+
366
+
main
367
+
├── main.js - Routes
368
+
├── main.controller.js - Controller for our main route
369
+
├── main.controller.spec.js - Test
370
+
├── main.html - View
371
+
└── main.less - Styles
372
+
373
+
An example server component in `server/api`
374
+
375
+
thing
376
+
├── index.js - Routes
377
+
├── thing.controller.js - Controller for our `thing` endpoint
0 commit comments