apeman-app-link

apeman app to parse links for jsonapi.

"!!NO LONGER_MAINTAINED"
Last updated 4 years ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install apeman-app-link 
SYNC missed versions from official npm registry.

apeman-app-link

Build Status Code Climate Code Coverage npm Version JS Standard

apeman app to parse links for jsonapi.

Installation

$ npm install apeman-app-link --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-link */

'use strict'

const co = require('co')

module.exports = {
  $pkg: { /* ... */ },
  $apps: {
    // Define your own app.
    'my-app-01': {
      // Map url and handlers.
      '/': [
        require('apeman-app-link')({
          // Options
          protocol: 'https',
          host: 'hoge.example.com'
        }),
        co.wrap(function * handler01 (ctx, next) {
          let link = ctx.link('/api/hoo/bar?page=1') // Resolve relative link to full path.
          /* ... */
        })
      ]
    }
  }
}

Then,

$ apeman app my-app-01 -p 3000

Signature

apemanAppLink(options) -> function

Resolve link url.

Args
Name Type Default Description
options object Optional settings.
options.protocol string http Link protocol.
options.host string Host setting.
options.pathname string Base pathname.

License

This software is released under the MIT License.

Links

Current Tags

  • 3.0.1                                ...           latest (4 years ago)

12 Versions

  • 3.0.1 [deprecated]           ...           4 years ago
  • 3.0.0 [deprecated]           ...           4 years ago
  • 2.0.1 [deprecated]           ...           4 years ago
  • 2.0.0 [deprecated]           ...           4 years ago
  • 1.0.7 [deprecated]           ...           4 years ago
  • 1.0.6 [deprecated]           ...           4 years ago
  • 1.0.5 [deprecated]           ...           4 years ago
  • 1.0.4 [deprecated]           ...           4 years ago
  • 1.0.3 [deprecated]           ...           4 years ago
  • 1.0.2 [deprecated]           ...           4 years ago
  • 1.0.1 [deprecated]           ...           4 years ago
  • 1.0.0 [deprecated]           ...           4 years ago
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 (1)

Copyright 2014 - 2016 © taobao.org |