Skip to content

Commit

Permalink
Review docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesus Gutierrez committed Feb 2, 2017
1 parent efab94d commit 18fd319
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -32,7 +32,7 @@ const logger = (call) => {

const app = new Condor()
.addService('./protos/greeter.proto', 'myapp.Greeter', new Greeter())
.addMiddleware('myapp', logger)
.addMiddleware(logger)
.start();
```

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Expand Up @@ -31,7 +31,7 @@ const logger = (call) => {

const app = new Condor()
.addService('./protos/greeter.proto', 'myapp.Greeter', new Greeter())
.addMiddleware('myapp', logger)
.addMiddleware(logger)
.start();
```

Expand Down
4 changes: 2 additions & 2 deletions docs/middleware.md
Expand Up @@ -63,7 +63,7 @@ The execution flow can be controlled based on what the middleware method returns

#### Do not affect the execution flow

If the middleware method doesn't return anything, or if it returns a promise that resolves to `undefined`, the execution will continue normally.
If the middleware method doesn't return anything, or if it returns a promise that resolves to any `falsy` value, the execution will continue normally.

```js
const app = new Condor();
Expand All @@ -87,7 +87,7 @@ app.addMiddleware(scope, (call) => {

#### Responding to the user

If the middleware method returns **a value**, or a promise that **resolves to a value** (anything different than `undefined`), Condor will respond to the user with such value, interrupting the execution of the next middleware methods and the actual method implementation.
If the middleware method returns **a value**, or a promise that **resolves to a value** (any `truthy` value), Condor will respond to the user with such value, interrupting the execution of the next middleware methods and the actual method implementation.

```js
const app = new Condor();
Expand Down
2 changes: 1 addition & 1 deletion docs/quick-start.md
Expand Up @@ -78,7 +78,7 @@ Before start, we recommend you to get familiar with [GRPC](http://www.grpc.io/).
var client = new greeterProto.myapp.Greeter('127.0.0.1:3000', grpc.credentials.createInsecure());

function sayHello(person) {
client.sayHello(person, function(error, greeting) {
client.sayHello(person, (error, greeting) => {
if (error) {
console.log(error);
return;
Expand Down

0 comments on commit 18fd319

Please sign in to comment.