This package has been deprecated

Author message:

no longer maintained

@betterthings/proxy

0.0.2 • Public • Published

Proxy

npm version

Usage

const fs = require('fs')
const path = require('path')
const startServers = require('@betterthings/proxy')

const config = {
  SKIN_A: {
    port: 9001,
    ssl: {
      cert: fs.readFileSync(path.resolve(__dirname, 'cert.pem')),
      key: fs.readFileSync(path.resolve(__dirname, 'key.pem')),
    },
    proxy: {
      host: 'localhost:5000',
      headers: {
        'X-SKIN': 'A',
      },
    },
  },
  SKIN_B: {
    port: 9002,
    ssl: {
      cert: fs.readFileSync(path.resolve(__dirname, 'cert.pem')),
      key: fs.readFileSync(path.resolve(__dirname, 'key.pem')),
    },
    proxy: {
      host: 'localhost:5000',
      headers: {
        'X-SKIN': 'B',
      },
    },
  },
  DEV_API: {
    port: 9100,
    proxy: {
      host: 'api.dev.example.com',
      auth: {
        user: 'knockknock',
        password: 'whosthere',
      },
    },
  },
}

startServers(config)

Authors

Readme

Keywords

Package Sidebar

Install

npm i @betterthings/proxy

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

5.14 kB

Total Files

4

Last publish

Collaborators

  • laooola
  • lusbuab