Skip to content

Commit

Permalink
docs: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
arlac77 committed Nov 16, 2019
1 parent f9a5e98 commit 2ae8728
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ koa backed http server
- [ServiceKOA](#servicekoa)
- [Parameters](#parameters)
- [Properties](#properties)
- [endpointFactoryFromConfig](#endpointfactoryfromconfig)
- [Parameters](#parameters-1)
- [name](#name)
- [RouteSendEndpoint](#routesendendpoint)
- [Parameters](#parameters-1)
- [Parameters](#parameters-2)

## ServiceKOA

Expand All @@ -46,6 +48,15 @@ HTTP server with koa
- `server` **http.Server** only present if state is running
- `koa` **koa**

### endpointFactoryFromConfig

#### Parameters

- `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
- `definition` **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \| [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))**

Returns **Class** RouteSendEndpoint if path is present of name starts with '/'

### name

Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 'koa'
Expand All @@ -54,15 +65,13 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G

**Extends SendEndpoint**

Endpoint to link against a koa route
Endpoint to link against a http route

### Parameters

- `name` {string} endpoint name
- `owner` {Step} the owner of the endpoint
- `path`
- `method` {string} http method defaults to get
- `serviceName` {string} if present registers the route as a service
- `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** endpoint name
- `owner` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** owner of the endpoint
- `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** (optional, default `{}`)

# install

Expand Down
2 changes: 1 addition & 1 deletion src/service-koa.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class ServiceKOA extends Service {
/**
*
* @param {string} name
* @param {object|string} definition
* @param {Object|string} definition
* @return {Class} RouteSendEndpoint if path is present of name starts with '/'
*/
endpointFactoryFromConfig(name, definition) {
Expand Down

0 comments on commit 2ae8728

Please sign in to comment.