1.0.4 • Published 10 years ago

apeman-middleware-proxy v1.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

apeman-middleware-proxy

Build Status Code Climate Code Coverage npm Version JS Standard

apeman middleware package for proxy

Installation

$ npm install apeman-middleware-proxy --save

Usage

create an middleware instance and attach to server settings like $api of apeman projects.

Apemanfile.js

/** This is an example Apemanfile to use apeman-middleware-proxy */

'use strict'

module.exports = {
  $pkg: { /* ... */ },
  $ui: {
    /* ... */
    $serverMiddlewares: [
      require('apeman-middleware-proxy')('/api/*', {
        target: {
          host: 'localhost',
          port: 3001
        }
      })
    ]
  }
}

Signature

apemanMiddlewareProxy(pattern, config) -> function

Create an middleware function

Args
NameTypeDefaultDescription
patternstringURL pattern to apply proxy.
configobjectProxy configuration.

License

This software is released under the MIT License.

Links

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago