apeman-middleware-proxy

1.0.4 • Public • Published

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
Name Type Default Description
pattern string URL pattern to apply proxy.
config object Proxy configuration.

License

This software is released under the MIT License.

Links

Readme

Keywords

Package Sidebar

Install

npm i apeman-middleware-proxy

Weekly Downloads

2

Version

1.0.4

License

MIT

Last publish

Collaborators

  • okunishinishi