# @igloosoftware/ig-proxy

> Igloo API/Resource Proxy server

Latest version **2.1.0** (published 2020-10-08) · UNLICENCED license · 0 weekly downloads

## Install

```sh
npm install @igloosoftware/ig-proxy
pnpm add @igloosoftware/ig-proxy
yarn add @igloosoftware/ig-proxy
bun add @igloosoftware/ig-proxy
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2020-10-08 |
| First published | 2016-01-12 |
| Weekly downloads | 0 |
| License | UNLICENCED |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 18.8 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| Author | Igloo Software |
| Maintainers | nevenatigloo, mattbrodrecht, iglooadmin, brianatigloo, wmacdonald, aaaron |
| Keywords | ig-proxy, igloosoftware, igloo-api-proxy |

## Links

- npm: https://www.npmjs.com/package/@igloosoftware/ig-proxy
- npm.io page: https://npm.io/package/@igloosoftware/ig-proxy

## Dependencies (8)

- [axios](https://npm.io/package/axios.md) ^0.19.2
- [chalk](https://npm.io/package/chalk.md) ^1.1.1
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [winston](https://npm.io/package/winston.md) ^3.2.1
- [cross-env](https://npm.io/package/cross-env.md) ^7.0.2
- [http-proxy](https://npm.io/package/http-proxy.md) ^1.18.0
- [app-root-path](https://npm.io/package/app-root-path.md) ^3.0.0
- [express-winston](https://npm.io/package/express-winston.md) ^4.0.3

## Recent versions

- 2.1.0 (latest) — 2020-10-08
- 2.0.0 — 2020-05-31
- 1.1.6 — 2019-03-04
- 1.1.5 — 2018-09-25
- 1.1.3 — 2018-07-24
- 1.1.2 — 2018-07-13
- 1.1.1 — 2017-03-30
- 1.1.0 — 2017-03-29
- 1.0.10 — 2016-02-27
- 1.0.9 — 2016-02-10
- 1.0.8 — 2016-02-10
- 1.0.7 — 2016-02-10
- 1.0.6 — 2016-02-09
- 1.0.5 — 2016-01-14
- 1.0.4 — 2016-01-12
- … 4 more at https://npm.io/package/@igloosoftware/ig-proxy/versions

## README

# Igloo API Proxy Server
A simple proxy harness that proxies local requests to a Digital Workplace and handles authentication and authorization.


### Prerequisites  
You or a member of your team will need to obtain an `appId` and `appPass`) value from [Igloo Customer Support](https://customercare.igloosoftware.com/support/developers).

You will need administration access to the digital workplace that you will be testing on.

### Install

- install the package into a new or existing project `npm i @igloosoftware/ig-proxy`

Create a `proxy-config.json` (or similarly named) file with your Digital Workplace credentials.
**Remember to never commit this file.**

#### Sample proxy-config.json

```json
{
  "appId": "The AppID provided by Igloo Support",
  "appPass": "The AppPass provided by Igloo Support",
  "username": "yourEmail@domain.com",
  "password": "yourSecurePassword",
  "dwpDomain": "my-dpw-url.igloocommunities.com",
  "authVersion": "AUTH_VERSION"
}
```
Note the URL in `dwpDomain` should not include the scheme (https://). `authVersion` is always going to default to v2 unless specified otherwise in your config.


### Basic Usage
The most basic usage you can provide a config object or path to your proxy-config
```js
require('@igloosoftware/ig-proxy')('./proxy-config.json');

// or more explicitly

const startProxy = require('@igloosoftware/ig-proxy');
startProxy('./proxy-config.json');
```    
  
### Advanced Usage
You can also create a proxy instance as part of a larger development harness.

```js 
const igProxy = require('@igloosoftware/ig-proxy');

async function start() {
  const config = await igProxy({
    appId: '...',
    appPass: '...',
    username: '...',
    password: '...',
    dwpDomain: '...',
    authVersion: '1',
    keepAliveSec: 60,
  });

  console.log(`Igloo proxy sever listening on ${config.port}`);
}

// start your harness and proxy
start();
```

---
_Source: https://npm.io/package/@igloosoftware/ig-proxy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
