Skip to content

Commit

Permalink
Merge pull request #10 from galenwarren/update_docs
Browse files Browse the repository at this point in the history
fix: clean up, add docs
  • Loading branch information
galenwarren authored Jul 7, 2018
2 parents e92e233 + b33693d commit 987e118
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 219 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'env',
{
targets: {
node: '8.9'
node: '7.6'
}
}
]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
coverage
dist
30 changes: 25 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
# awilix-groa

Awilix helpers/middleware for [Groa](https://github.com/GroaJS/groa)

## Under development, please check back later ...

[![CircleCI](https://circleci.com/gh/galenwarren/awilix-groa/tree/master.svg?style=svg)](https://circleci.com/gh/galenwarren/awilix-groa/tree/master)
[![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest) [![Coverage Status](https://coveralls.io/repos/github/galenwarren/awilix-groa/badge.svg?branch=master)](https://coveralls.io/github/galenwarren/awilix-groa?branch=master)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

Requires Node v8.9+
[Awilix](https://github.com/jeffijoe/awilix) helpers, router and scope-instanatiating middleware for [groa](https://github.com/GroaJS/groa). This does for [groa](https://github.com/GroaJS/groa) and [groa-router](https://github.com/GroaJS/groa-router) what [awilix-koa](https://github.com/jeffijoe/awilix-koa) does for [koa](https://github.com/koajs/koa) and [koa-router](https://github.com/alexmingoia/koa-router), i.e. enables [grpc](https://grpc.io/) server development using middleware and dependency injection, with routing support.

## Requirements

Requires Node v7.6+, as `groa` depends on async/await support.

## Installation

```
npm install --save awilix-koa
```

## Motivation

See the [discussion](https://github.com/jeffijoe/awilix-koa#why-do-i-need-it) in `awilix-koa`.

## Differences vs. awilix-koa

This library mimics `awilix-koa` wherever possible, and it uses the same underlying [awilix-router-core](https://github.com/jeffijoe/awilix-router-core) library.

The main difference is that grpc does not use verbs (i.e GET, POST, etc.) so the the verb-related builder methods and decorators are not supported. Instead, the builder supports an [rpc]() method (builder pattern) and there is an [@RPC]() decorator to declare rpc methods (decorator pattern).

## Documentation

More detailed library documentation is [here](https://galenwarren.github.io/awilix-groa/) (*in progress*).
99 changes: 0 additions & 99 deletions dist/controller.js

This file was deleted.

62 changes: 0 additions & 62 deletions dist/index.js

This file was deleted.

33 changes: 0 additions & 33 deletions dist/invokers.js

This file was deleted.

19 changes: 0 additions & 19 deletions dist/scopePerRequest.js

This file was deleted.

4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* @module awilix-groa
*/

export { route, before, after } from 'awilix-router-core';

export * from './scopePerRequest';
Expand Down

0 comments on commit 987e118

Please sign in to comment.