This package has been deprecated

Author message:

"!!NO LONGER_MAINTAINED"

apeman-app-fetch

4.0.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i apeman-app-fetch

Weekly Downloads

2

Version

4.0.0

License

MIT

Last publish

Collaborators

  • okunishinishi