Skip to content

Commit be4984b

Browse files
authored
Merge pull request #104 from strongloop/updated-external-readmes
updating external readmes
2 parents 1e29930 + c6dc081 commit be4984b

11 files changed

+134
-129
lines changed

_includes/readmes/loopback-android-getting-started.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,42 @@ LoopBack Open Node.js Mobile API Middle tier.
66

77
## Setting up the Development Environment
88

9-
1. Install [Eclipse Android Development Tools](http://developer.android.com/sdk/index.html)
10-
1. Open Window > Android SDK Manager, make sure you have these modules
11-
installed:
12-
* Tools > Android SDK Platform-tools 18 or newer
13-
* Tools > Android SDK Build-tools 18 or newer
14-
* Android 4.3 (API 18) > SDK Platform
15-
* Extras > Google Play Services
16-
1. Import the Android project in this directory:
17-
* Run File > Import
18-
* Select Android > Existing Android Code Into Workspace
19-
* Choose the directory where you have the Getting Started application.
20-
* Select LoopBackExample for import
21-
1. Import Google Play services library project into your workspace. The
22-
project is located inside the directory where you have installed i
23-
the Android SDK.
9+
1. Install [Eclipse Android Development Tools](http://developer.android.com/sdk/index.html)
10+
1. Open Window > Android SDK Manager, make sure you have these modules
11+
installed:
12+
* Tools > Android SDK Platform-tools 18 or newer
13+
* Tools > Android SDK Build-tools 18 or newer
14+
* Android 4.3 (API 18) > SDK Platform
15+
* Extras > Google Play Services
16+
1. Import the Android project in this directory:
17+
* Run File > Import
18+
* Select Android > Existing Android Code Into Workspace
19+
* Choose the directory where you have the Getting Started application.
20+
* Select LoopBackExample for import
21+
1. Import Google Play services library project into your workspace. The
22+
project is located inside the directory where you have installed i
23+
the Android SDK.
2424
* Run File > Import
2525
* Select Android > Existing Android Code Into Workspace
2626
* Go to
27-
```
28-
<android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/
29-
```
27+
28+
```
29+
<android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/
30+
```
3031
* Select google-play-services_lib for import
3132
* Check "Copy projects into workspace"
3233
* Click "Finish".
3334
34-
See this page for more details:
35-
[Set Up Google Play Services SDK](http://developer.android.com/google/play-services/setup.html)
36-
1. Add google-play-services\_lib as a build dependency of the Guide Application
35+
See this page for more details:
36+
[Set Up Google Play Services SDK](http://developer.android.com/google/play-services/setup.html)
37+
1. Add google-play-services\_lib as a build dependency of the Guide Application
3738
* In the Package Explorer, select LoopbackGuideApplication
3839
* Run File &gt; Project Properties
3940
* Select Android
4041
* In the Library frame, click on "Add..." and select google-play-services_lib
41-
1. Obtain an API key for Google Maps Android API v2
42-
[instructions](https://developers.google.com/maps/documentation/android/start#obtaining_an_api_key)
43-
and enter it into AndroidManifest.xml.
42+
1. Obtain an API key for Google Maps Android API v2
43+
[instructions](https://developers.google.com/maps/documentation/android/start#obtaining_an_api_key)
44+
and enter it into AndroidManifest.xml.
4445
4546
---
4647

_includes/readmes/loopback-example-access-control.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#loopback-example-access-control
1+
# loopback-example-access-control
22

33
```
44
$ git clone https://github.com/strongloop/loopback-example-access-control
@@ -19,28 +19,28 @@ LoopBack. The application consists of four types of users:
1919
Each user type has permission to perform tasks based on their role and the
2020
application's ACL (access control list) entries.
2121

22-
##Prerequisites
22+
## Prerequisites
2323

24-
###Tutorials
24+
### Tutorials
2525

2626
- [Getting started with LoopBack](http://docs.strongloop.com/display/LB/Getting+started+with+LoopBack)
2727
- [Tutorial series - step 1](https://github.com/strongloop/loopback-example#step-one---the-basics)
2828
- [Tutorial series - step 2](https://github.com/strongloop/loopback-example#step-two---relations-and-filter)
2929
- [Tutorial series - step 3](https://github.com/strongloop/loopback-example#step-three---adding-application-logic)
3030

31-
###Knowledge
31+
### Knowledge
3232

3333
- [EJS](https://github.com/visionmedia/ejs)
3434
- [body-parser](https://github.com/expressjs/body-parser)
3535
- [JSON](http://json.org/)
3636
- [LoopBack models](http://docs.strongloop.com/display/LB/Defining+models)
3737
- [LoopBack adding application logic](http://docs.strongloop.com/display/LB/Adding+application+logic)
3838

39-
##Procedure
39+
## Procedure
4040

41-
###Create the application
41+
### Create the application
4242

43-
####Application information
43+
#### Application information
4444

4545
- Name: `loopback-example-access-control`
4646
- Directory to contain the project: `loopback-example-access-control`
@@ -51,9 +51,9 @@ $ slc loopback loopback-example-access-control
5151
$ cd loopback-example-access-control
5252
```
5353

54-
###Add the models
54+
### Add the models
5555

56-
####Model information
56+
#### Model information
5757
- Name: `user`
5858
- Datasource: `db (memory)`
5959
- Base class: `User`
@@ -94,17 +94,17 @@ $ slc loopback:model user
9494
... # follow the prompts, repeat for `team` and `project`
9595
```
9696

97-
###Define the remote methods
97+
### Define the remote methods
9898

9999
Define three remote methods in [`project.js`](https://github.com/strongloop/loopback-example-access-control/blob/master/common/models/project.js):
100100

101101
- [`listProjects`](https://github.com/strongloop/loopback-example-access-control/blob/master/common/models/project.js#L2-L13)
102102
- [`donate`](https://github.com/strongloop/loopback-example-access-control/blob/master/common/models/project.js#L15-L31)
103103
- [`withdraw`](https://github.com/strongloop/loopback-example-access-control/blob/master/common/models/project.js#L33-54)
104104

105-
###Create the model relations
105+
### Create the model relations
106106

107-
####Model relation information
107+
#### Model relation information
108108

109109
- `user`
110110
- has many
@@ -128,7 +128,7 @@ Define three remote methods in [`project.js`](https://github.com/strongloop/loop
128128
- Property name for the relation: `user`
129129
- Custom foreign key: `ownerId`
130130

131-
###Add model instances
131+
### Add model instances
132132

133133
Create a boot script named [`sample-models.js`](https://github.com/strongloop/loopback-example-access-control/blob/master/server/boot/sample-models.js).
134134

@@ -143,7 +143,7 @@ This script does the following:
143143
- [Creates a role named `admin` and adds a role mapping to make `Bob` an
144144
`admin`](/server/boot/sample-models.js#L50-L65)
145145

146-
###Configure server-side views
146+
### Configure server-side views
147147

148148
> LoopBack comes preconfigured with EJS out-of-box. This means we can use
149149
> server-side templating by simply setting the proper view engine and a
@@ -160,7 +160,7 @@ Create [`index.ejs` in the views directory](https://github.com/strongloop/loopba
160160
[Configure `server.js`](https://github.com/strongloop/loopback-example-access-control/blob/master/server/server.js#L11-L20) to use server-side
161161
templating. Remember to import the [`path`](https://github.com/strongloop/loopback-example-access-control/blob/master/server/server.js#L4) package.
162162

163-
###Add routes
163+
### Add routes
164164

165165
Create [`routes.js`](https://github.com/strongloop/loopback-example-access-control/blob/master/server/boot/routes.js). This script does the following:
166166

@@ -171,13 +171,13 @@ Create [`routes.js`](https://github.com/strongloop/loopback-example-access-contr
171171

172172
> When you log in sucessfully, `projects.html` is rendered with the authenticated user's access token embedded into each link.
173173
174-
###Create the views
174+
### Create the views
175175

176176
Create the [`views` directory](https://github.com/strongloop/loopback-example-access-control/tree/master/server/views) to store views.
177177

178178
In this directory, create [`index.ejs`](https://github.com/strongloop/loopback-example-access-control/blob/master/server/views/index.ejs) and [`projects.ejs`](https://github.com/strongloop/loopback-example-access-control/blob/master/server/views/projects.ejs).
179179

180-
###Create a role resolver
180+
### Create a role resolver
181181

182182
Create [`role-resolver.js`](https://github.com/strongloop/loopback-example-access-control/blob/master/server/boot/role-resolver.js).
183183

@@ -186,11 +186,11 @@ Create [`role-resolver.js`](https://github.com/strongloop/loopback-example-acces
186186
> denied. Otherwise, we check to see if the user is a team member and process
187187
> the request accordingly.
188188
189-
###Create ACL entries
189+
### Create ACL entries
190190

191191
> ACLs are used to restrict access to application REST endpoints.
192192
193-
####ACL information
193+
#### ACL information
194194

195195
- Deny access to all project REST endpoints
196196
- Select the model to apply the ACL entry to: `(all existing models)`
@@ -236,9 +236,9 @@ $ slc loopback:acl
236236
# follow the prompts, repeat for each ACL listed above
237237
```
238238

239-
###Try the application
239+
### Try the application
240240

241-
Start the server (`node .`) and open [`localhost:3000`][localhost] in your browser to view the app. You will see logins and explanations related to each user type we created:
241+
Start the server (`node .`) and open [`localhost:3000`](http://localhost:3000) in your browser to view the app. You will see logins and explanations related to each user type we created:
242242

243243
- Guest `Guest`
244244
- Role = $everyone, $unauthenticated

_includes/readmes/loopback-example-connector-rest.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[strongloop-website]: http://strongloop.com/
22

3-
#loopback-example-rest-connector
3+
# loopback-example-rest-connector
44

55
- [Overview](#Overview)
66
- [Running the app](#running-the-app)
@@ -19,7 +19,7 @@ this REST API.
1919
$ git clone https://github.com/strongloop/loopback-example-rest-connector.git
2020
$ cd loopback-example-rest-connector/external-server
2121
$ npm install
22-
# node .
22+
$ node .
2323
```
2424
In another shell:
2525
```
@@ -35,7 +35,7 @@ explorer or by running `curl localhost:3000/api/Magazines`.
3535
## FAQs
3636
The following are common questions related to using the REST connector.
3737

38-
##How do you perform a GET request to a remote server?
38+
## How do you perform a GET request to a remote server?
3939
In this example, we have a REST API exposed in [model-config.json](https://github.com/strongloop/loopback-example-rest-connector/blob/master/external-server/server/model-config.json#L31)
4040
.
4141

_includes/readmes/loopback-example-database-oracle.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,22 +78,23 @@ cd loopback-example-database
7878
npm install --save loopback-connector-oracle
7979
```
8080

81-
> ####Automatic PATH modification
81+
> #### Automatic PATH modification
82+
> **⚠️ DEPRECATED loopback 1.x feature**
8283
> During installation, you will see:
83-
> ```
84-
> ...
85-
> ---------------------------------------------------------------------------
86-
> The node-oracle module and the Oracle specific libraries have been
87-
> installed in /Users/sh/repos/loopback-example-database/node_modules/loopback-connector-oracle/node_modules/loopback-oracle-installer.
8884
>
89-
> The default bashrc (/etc/bashrc) or user's bash_profile (~/.bash_profile)
90-
> paths have been modified to use this path. If you use a shell other than
91-
> bash, please remember to set the DYLD_LIBRARY_PATH prior to using node.
85+
> ...
86+
> ---------------------------------------------------------------------------
87+
> The node-oracle module and the Oracle specific libraries have been
88+
> installed in /Users/sh/repos/loopback-example-database/node_modules/loopback-connector-oracle/node_modules/loopback-oracle-installer.
89+
>
90+
> The default bashrc (/etc/bashrc) or user's bash_profile (~/.bash_profile)
91+
> paths have been modified to use this path. If you use a shell other than
92+
> bash, please remember to set the DYLD_LIBRARY_PATH prior to using node.
93+
>
94+
> Example:
95+
> $ export DYLD_LIBRARY_PATH=":/Users/$USER/repos/loopback-example-database/node_modules/loopback-connector-oracle/node_modules/instantclient:/Users/$USER/repos/loopback-example-database/node_modules/loopback-connector-oracle/node_modules/instantclient"
96+
> ...
9297
>
93-
> Example:
94-
> $ export DYLD_LIBRARY_PATH=":/Users/$USER/repos/loopback-example-database/node_modules/loopback-connector-oracle/node_modules/instantclient:/Users/$USER/repos/loopback-example-database/node_modules/loopback-connector-oracle/node_modules/instantclient"
95-
> ...
96-
> ```
9798
>
9899
> This is a **DEPRECATED** feature from LoopBack 1.x (we will remove this
99100
> message in a future update. Due to concerns raised in the past regarding the

_includes/readmes/loopback-example-kv-connectors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
**PLEASE CREATE ISSUES AT https://github.com/strongloop/loopback/issues**
1+
**PLEASE CREATE ISSUES AT <https://github.com/strongloop/loopback/issues>**
22

33
---
44

_includes/readmes/loopback-example-middleware.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#loopback-example-middleware
1+
# loopback-example-middleware
22
```
33
$ git clone [email protected]:strongloop/loopback-example-middleware.git
44
$ cd loopback-example-middleware
@@ -8,14 +8,13 @@ $ node .
88

99
- [How do you serve static content via static middleware?](https://github.com/strongloop/loopback-example-middleware#how-do-you-serve-static-content-via-static-middleware)
1010

11-
#How do you serve static content via static middleware?
11+
## How do you serve static content via static middleware?
1212
1. Add static middleware to the [files property](https://github.com/strongloop/loopback-example-middleware/blob/master/server/middleware.json#L17-L19) in middleware.json
1313
2. Delete [`server/boot/root.js`](https://github.com/strongloop/loopback-example-middleware/blob/master/server/boot).
1414
3. Create [`client/index.html`](https://github.com/strongloop/loopback-example-middleware/blob/master/client/index.html)
1515
4. Start the server via `node .` and browse to [`localhost:3000`](http://localhost:3000). You should see `hello world` being served.
1616

17-
18-
#How do you create a custom error message for all errors?
17+
## How do you create a custom error message for all errors?
1918
1. Create a [single function](https://github.com/strongloop/loopback-example-middleware/blob/master/server/server.js#L33-l41) that all errors are passed to.
2019
2. Set [`app.get('remoting').errorHandler`](https://github.com/strongloop/loopback-example-middleware/blob/master/server/server.js#L23-l31) to call a custom error handler.
2120
3. Create a [`custom error middleware`](https://github.com/strongloop/loopback-example-middleware/blob/master/server/middleware/custom-error.js) to handle errors not thrown by the `loopback.rest()` middleware.

_includes/readmes/loopback-example-mixins.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Specify mixin locations relative to the `server/model-config.json` file. Multip
1818
### npm module
1919

2020
This loads the [loopback-ds-timestamp-mixin](https://www.npmjs.com/package/loopback-ds-timestamp-mixin) module from the top level `node_modules` directory. Note that this module provides a mixin file `time-stamp.js` which is registered as the camel case `TimeStamp` name.
21+
2122
```js
2223
{
2324
"_meta": {
@@ -43,6 +44,7 @@ This loads the [loopback-ds-timestamp-mixin](https://www.npmjs.com/package/loopb
4344
}
4445
}
4546
```
47+
4648
### The local `server/mixins/` directory
4749

4850
Because the `model-config.json` is within the `server` directory this loads the mixins from current mixins directory.

0 commit comments

Comments
 (0)