Skip to content

Commit 891686b

Browse files
committed
docs(): update some docs for canary
1 parent c266881 commit 891686b

File tree

5 files changed

+43
-34
lines changed

5 files changed

+43
-34
lines changed

Diff for: docs/01_Getting_Started/01_Prerequisites.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ your computer's startup. Example:
2323

2424
### node-gyp
2525

26-
`node-gyp` is a cross-platform command-line tool written in Node.js for compiling native addon modules for Node.js. You'll need it for things like brotli compression.
26+
`node-gyp` is a cross-platform command-line tool written in Node.js for compiling native addon modules for Node.js. You'll need it for things like `uws`.
2727

2828
Read through the [Installation section of the `node-gyp` readme](https://github.com/nodejs/node-gyp#installation). Basically you'll need [Python 2.7](https://www.python.org/downloads/), `make`, and a C/C++ compiler (like GCC on unix, Xcode on OS X, or Visual Studio tools on Windows). To tell npm to use Python 2.7 (if you also have a different version installed), run `npm config set python /path/to/executable/python2.7`. Here's a snapshot of the instructions from their readme:
2929

Diff for: docs/01_Getting_Started/03_Running_Your_New_App.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
## Running Your New App
22

3-
You can start your new app by running `gulp serve`. This will do some preliminary things like clean out temporary
4-
files, lint your scripts, inject any new CSS files into your main one, apply environment variables, and download
5-
any new TypeScript definitions. It will then start up a new development server, which will kick off a Webpack build.
6-
it uses Browser Sync to facilitate front-end development. Your files will also be watched for changes. Any front-end
7-
changes will kick off another webpack build. Any back-end changes will restart the back-end server, cleaning the
8-
development database and re-seeding it as well.
3+
You can start your new app by running `npm run start:server` and `npm run start:client`. This will start up the Node.js
4+
back-end server, as well as a Webpack dev server to serve the front-end files (with things like Hot Module Replacement).
5+
Your files will be watched for changes. Any front-end changes will be seen by the Webpack server, and any back-end
6+
changes will restart the back-end server, cleaning the development database and re-seeding it as well.
97

10-
Once the `serve` tasks are complete, a browser tab should be opened to your new app server.
8+
The `npm run start:client` task will show you at which local port you can access your front-end app (usually http://localhost:8080/).

Diff for: docs/01_Getting_Started/04_Project_Overview.md

+6-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Project Overview
22

3-
What follows is an overfiew of the files/folders in your newly generated project.
3+
What follows is an overview of the files/folders in your newly generated project.
44

55
### Project Root
66

@@ -29,18 +29,18 @@ webpack.make.js // main file for Webpack configuration
2929

3030
```
3131
│ .eslintrc // eslint config for client files
32-
│ polyfills.js // imports of polyfills
3332
│ _index.html // template for the root HTML file of your app
3433
3534
├───app
36-
│ │ app.config.js // contains app-wide configuration code
35+
│ │ app.js // App entry point
36+
│ │ app.component.js // Root-level Angular component (loads header, footer, and current route)
3737
│ │ app.constants.js // gets injected with constants from `server/config/environment/shared.js`
3838
│ │ app.{js,ts} // root JavaScript file of your app
3939
│ │ app.{css,scss,stylus,less} // root CSS file of your app
40+
│ | polyfills.js // imports of polyfills
4041
│ │
4142
│ ├───account // pages related to login / signup / user settings
42-
│ │ │ account.routes.js // route information
43-
│ │ │ index.js // account module root
43+
│ │ │ account.module.js // account module root
4444
│ │ │
4545
│ │ ├───login
4646
│ │ ├───settings
@@ -56,25 +56,19 @@ webpack.make.js // main file for Webpack configuration
5656
├───auth
5757
│ auth.module.js // module containing auth components
5858
│ auth.service.js // authentication service
59-
│ interceptor.service.js // intercepts requests and adds tokens if needed. Also redirects 401s to the login page.
60-
│ router.decorator.js // facilitates auth-based routing configuration
6159
│ user.service.js // user resource service
6260
6361
├───footer
6462
65-
├───modal
66-
6763
├───navbar
6864
6965
├───oauth-buttons // buttons for oauth login on signup / login pages
7066
7167
├───socket
68+
│ primus.mock.js // mock for the Primus class (WebSocket framework)
7269
│ socket.mock.js // mock service for unit testing
7370
│ socket.service.js // service for Socket IO integration
7471
75-
├───ui-router
76-
│ ui-router.mock.js // mock service for unit testing
77-
7872
└───util // general utility service
7973
```
8074

Diff for: docs/02_Developing/00_Starting_Up.md

+19-6
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
Now that you've gone through everything in the Getting Started section, lets get our app up and running. We do this by running the following:
44

55
```bash
6-
$ gulp serve
6+
$ npm run start:server
7+
```
8+
```bash
9+
$ npm run start:client
710
```
811

12+
<!--
913
We should see something like this spit out after it:
1014
1115
```bash
@@ -76,6 +80,7 @@ Child html-webpack-plugin for "..\client\index.html":
7680
../client/index.html 2.69 kB 0
7781
webpack: bundle is now VALID.
7882
```
83+
-->
7984

8085
And then our default browser should open up to the app:
8186

@@ -87,7 +92,10 @@ Fantastic! We're now up and running with our Full-Stack Angular web application!
8792

8893
### Homepage
8994

90-
Assuming you scaffolded with a back-end database, you should see some 'features'. If you scaffolded with socket.io, you should see 'x' buttons next to each, and an input box. Try opening two browser windows to the same page side-by-side, and hitting the 'x' on one of the features. You should see the feature get removed on both web pages. Neat! This is because these database object changes are communicated to clients using socket.io.
95+
Assuming you scaffolded with a back-end database, you should see some 'features'. If you scaffolded with socket.io,
96+
you should see 'x' buttons next to each, and an input box. Try opening two browser windows to the same page
97+
side-by-side, and hitting the 'x' on one of the features. You should see the feature get removed on both web pages.
98+
Neat! This is because these database object changes are communicated to clients using socket.io.
9199

92100

93101
<img src="../images/socket.io-demo.gif" alt="Socket.io demo screenshot">
@@ -97,9 +105,11 @@ Neat. Let's see what else we can do.
97105

98106
### Auth
99107

100-
Assuming you scaffolded with auth support, you should see a 'Sign Up' and a 'Log In' button at the top-right of your page. Let's go to the Log In page.
108+
Assuming you scaffolded with auth support, you should see a 'Sign Up' and a 'Log In' button at the top-right of your
109+
page. Let's go to the Log In page.
101110

102-
You should see inputs for an email address and a password. When running your project in a devlopment environment, you'll get two user accounts automatically generated:
111+
You should see inputs for an email address and a password. When running your project in a development environment, you'll
112+
get two user accounts automatically generated:
103113

104114
* Test User
105115
@@ -110,9 +120,12 @@ You should see inputs for an email address and a password. When running your pro
110120
* password: admin
111121
* role: admin
112122

113-
Go ahead and log in with the admin account, so we can see the extra admin bits too. You should then get sent back to the home page, but should notice that the navbar looks a bit different:
123+
Go ahead and log in with the admin account, so we can see the extra admin bits too. You should then get sent back to the
124+
home page, but should notice that the navbar looks a bit different:
114125

115126
<img src="../images/logged-in.jpg" alt="Logged in as admin screenshot">
116127

117128

118-
First, at the top right, we see a greeting for our username, a cog icon (for user settings), and a logout button. Then, since we're an admin, we see a new 'Admin' state on the navbar. The admin section lists users and allows you to delete them. The user settings page allows you to change your password.
129+
First, at the top right, we see a greeting for our username, a cog icon (for user settings), and a logout button. Then,
130+
since we're an admin, we see a new 'Admin' state on the navbar. The admin section lists users and allows you to delete
131+
them. The user settings page allows you to change your password.

Diff for: docs/02_Developing/01_Adding_a_Route.md

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
> ATTENTION: THIS PAGE IS OUT-OF-DATE
2+
13
# Adding a Route
24

35
Alright, now let's add another route to our app. We'll call it 'foo'. We can easily do this with the `yo angular-fullstack:route` subgenerator command:
@@ -10,11 +12,10 @@ $ yo angular-fullstack:route foo
1012
? Where would you like to create this route? client/app/
1113
? What will the url of your route be? (/foo)
1214
? What will the url of your route be? /foo
13-
identical client\app\foo\foo.routes.js
14-
identical client\app\foo\foo.component.js
15-
identical client\app\foo\foo.component.spec.js
16-
identical client\app\foo\foo.html
17-
identical client\app\foo\foo.scss
15+
create client\app\foo\foo.component.js
16+
create client\app\foo\foo.component.spec.js
17+
create client\app\foo\foo.html
18+
create client\app\foo\foo.scss
1819

1920
In the parent of this component, you should now import this component and add it as a dependency:
2021

@@ -23,11 +24,14 @@ In the parent of this component, you should now import this component and add it
2324
export angular.module('myParentModule', [FooComponent]);
2425
```
2526

26-
We give it our route name ('foo'), and a few more details: the name of the Angular module to create ('myApp.foo'), which folder to put the route under ('client/app/foo/'), and the URL of the route ('localhost:3000/foo').
27+
We give it our route name ('foo'), and a few more details: the name of the Angular module to create ('myApp.foo'), which
28+
folder to put the route under ('client/app/foo/'), and the URL of the route ('localhost:3000/foo').
2729

28-
This will create an Angular 1.5 component with an Angular module (`foo.component.js`), a template file (`foo.html`), a CSS file (`foo.scss`), a unit test file (`foo.component.spec.js`), and a routing file (`foo.routes.js`).
30+
This will create an Angular component with an Angular module (`foo.component.js`), a template file (`foo.html`), a CSS
31+
file (`foo.scss`), a unit test file (`foo.component.spec.js`), and a routing file (`foo.routes.js`).
2932

30-
Since we're using Webpack, We'll need to import our component somewhere. Since this is a generic app route (and for simplicity), we'll import it in `app.js`, under our root Angular module, like so:
33+
Since we're using Webpack, We'll need to import our component somewhere. Since this is a generic app route
34+
(and for simplicity), we'll import it in `app.js`, under our root Angular module, like so:
3135

3236
`client/app/app.js`
3337
```js

0 commit comments

Comments
 (0)