baiji-gateway
Gateway for baiji application
Last updated 2 years ago by lyfeyaj .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install baiji-gateway 
SYNC missed versions from official npm registry.

Baiji Gateway

Under active development

Gateway for baiji application

Installation

Run npm install baiji-gateway --save to install it.

Usage

// Options:
//   allowedAPIs: Whitelist api list
//   forbiddenAPIs: Blacklist api list
//   max: Maximum api requests at the same time
//   onError(err, ctx, next): Error handler
//   name: Gateway method name, default is `__gateway__`
//   path: Gateway api path, default is `gateway`
//   verb: Gateway http method, default is `post`

// Request body defination
{
  articles: {
    method: 'myApp.articles.index',
    params: { page: 1, perPage: 10 },
    dependencies: [
      'create'
    ]
  },
  create: {
    method: 'myApp.articles.create',
    params: { title: 'News', content: 'Blablabla .....' },
    dependencies: []
  }
}

License

Current Tags

  • 0.0.1-alpha.13                                ...           latest (2 years ago)

13 Versions

  • 0.0.1-alpha.13                                ...           2 years ago
  • 0.0.1-alpha.12                                ...           2 years ago
  • 0.0.1-alpha.11                                ...           2 years ago
  • 0.0.1-alpha.10                                ...           2 years ago
  • 0.0.1-alpha.9                                ...           2 years ago
  • 0.0.1-alpha.8                                ...           2 years ago
  • 0.0.1-alpha.7                                ...           3 years ago
  • 0.0.1-alpha.6                                ...           3 years ago
  • 0.0.1-alpha.5                                ...           3 years ago
  • 0.0.1-alpha.4                                ...           3 years ago
  • 0.0.1-alpha.3                                ...           3 years ago
  • 0.0.1-alpha.2                                ...           3 years ago
  • 0.0.1-alpha.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |