apeman-app-fetch

apeman app to fetch data from another api.

"!!NO LONGER_MAINTAINED"
Last updated a year ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install apeman-app-fetch 
SYNC missed versions from official npm registry.

apeman-app-fetch

Build Status Code Climate Code Coverage npm Version JS Standard

apeman app to fetch data from another api.

Define res.fetch() method to send another request with HTTP GET method.

Installation

$ npm install apeman-app-fetch --save

Usage

  1. Define an app within Apemanfile.js
  2. Call the app via apeman app command.

Apemanfile.js

/** This is an example Apemanfile to use apeman-app-fetch */

'use strict'

module.exports = {
  $pkg: { /* ... */ },
  $apps: {
    // Define your own app.
    'my-app-01': {
      // Map url and handlers.
      '/': [
        require('apeman-app-fetch')('http://localhsot:3001', {}),
        (req, res, next) => {
          req.fetch('/dos/1', ((data) => {
            /* ... */
            next()
          }))
        }
      ]
    }
  }
}

Then,

$ apeman app my-app-01 -p 3000

Signature

apemanAppFetch(options) -> function

apeman app to fetch data from another api.

Args
Name Type Default Description
options object Optional settings.

License

This software is released under the MIT License.

Links

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (15)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |