Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: document local-credentials.json #30

Merged
merged 2 commits into from
Jul 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ see [gp-nodejs-sample](https://github.com/IBM-Bluemix/gp-nodejs-sample).

## Quickstart - Bluemix

Add `g11n-pipeline` to your project, as well as `cfenv` and `optional`.
* Add `g11n-pipeline` to your project, as well as `cfenv` and `optional`.

npm install --save g11n-pipeline cfenv optional

Load the client object as follows (using [cfenv](https://www.npmjs.com/package/cfenv) ).
You can store a copy of the credentials in `local-credentials.json` for local
operation.
* Load the client object as follows (using [cfenv](https://www.npmjs.com/package/cfenv) ).

```javascript
var optional = require('optional');
Expand All @@ -34,6 +32,18 @@ var gpClient = require('g11n-pipeline').getClient(
);
```

* For local testing, create a `local-credentials.json` file with the credentials
as given in the bound service:

{
"credentials": {
"url": "https://…",
"userId": "…",
"password": "……",
"instanceId": "………"
}
}

## Using

To fetch the strings for a bundle named "hello", first create a bundle accessor:
Expand Down
18 changes: 14 additions & 4 deletions template-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ see [gp-nodejs-sample](https://github.com/IBM-Bluemix/gp-nodejs-sample).

## Quickstart - Bluemix

Add `g11n-pipeline` to your project, as well as `cfenv` and `optional`.
* Add `g11n-pipeline` to your project, as well as `cfenv` and `optional`.

npm install --save g11n-pipeline cfenv optional

Load the client object as follows (using [cfenv](https://www.npmjs.com/package/cfenv) ).
You can store a copy of the credentials in `local-credentials.json` for local
operation.
* Load the client object as follows (using [cfenv](https://www.npmjs.com/package/cfenv) ).

```javascript
var optional = require('optional');
Expand All @@ -34,6 +32,18 @@ var gpClient = require('g11n-pipeline').getClient(
);
```

* For local testing, create a `local-credentials.json` file with the credentials
as given in the bound service:

{
"credentials": {
"url": "https://…",
"userId": "…",
"password": "……",
"instanceId": "………"
}
}

## Using

To fetch the strings for a bundle named "hello", first create a bundle accessor:
Expand Down