# transformium

> Transformium is a simple API proxy server implemented using Express. API proxy configuration can be applied immediately on the running server without restarting.

Latest version **0.2.0** (published 2019-05-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install transformium
pnpm add transformium
yarn add transformium
bun add transformium
```

Provides the command `tf`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2019-05-18 |
| First published | 2019-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 8.0.0 |
| Dependencies | 15 |
| Unpacked size | 29 KB |
| Known vulnerabilities | 0 (+7 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Jung Yongwoo |
| Maintainers | stegano |
| Keywords | transformium, apis, endpoints, api gateway, microservice, express, mocking, lambda, serverless, api-proxy |

## Links

- npm: https://www.npmjs.com/package/transformium
- Repository: https://github.com/stegano/transformium
- Issues: https://github.com/stegano/transformium/issues
- npm.io page: https://npm.io/package/transformium

## Dependencies (15)

- [ip](https://npm.io/package/ip.md) ^1.1.5
- [url](https://npm.io/package/url.md) ^0.11.0
- [path](https://npm.io/package/path.md) ^0.12.7
- [sha1](https://npm.io/package/sha1.md) ^1.1.1
- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [yargs](https://npm.io/package/yargs.md) ^13.2.2
- [bunyan](https://npm.io/package/bunyan.md) ^1.8.12
- [express](https://npm.io/package/express.md) ^4.16.4
- [request](https://npm.io/package/request.md) ^2.88.0
- [winston](https://npm.io/package/winston.md) ^3.2.1
- [chokidar](https://npm.io/package/chokidar.md) ^2.1.5
- [fs-extra](https://npm.io/package/fs-extra.md) ^7.0.1
- [safe-eval](https://npm.io/package/safe-eval.md) ^0.4.1
- [workerpool](https://npm.io/package/workerpool.md) ^3.1.2
- [lodash.merge](https://npm.io/package/lodash.merge.md) ^4.6.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2019-05-18
- 0.1.0 — 2019-05-01

## README

# Transformium

[![NPM version](https://img.shields.io/npm/v/transformium.svg)](https://www.npmjs.com/package/transformium)
[![GitHub issues](https://img.shields.io/github/issues-raw/stegano/transformium.svg)](https://github.com/stegano/transformium)
[![Travis](https://img.shields.io/travis/stegano/transformium.svg)](https://travis-ci.org/stegano/transformium)

> Transformium is a simple API proxy server implemented using [Express](https://expressjs.com).
> API proxy configuration can be applied immediately on the running server without restarting.

## Overview

Transformium quickly create the necessary APIs or mocking data, or modify the API response data received from the back-end server without modifying the server code directly.

### Installation

The easiest way to install transformium is with [npm](https://www.npmjs.com/).

```bash
$ npm install transformium -g
```

Alternately, download the source.

```bash
$ git clone https://github.com/stegano/transformium.git
```

### Commands

Run the server using the command below.

```bash
$ tf --port 3000 --api-config-path "<apiConfigs path to use>"
```

Then open a browser and access `http://localhost:3000/api/test` to see if the server is running properly.

### ApiConfigLoaders

> ApiConfigLoader is a loader that reflects proxy configuration information to the server.

- You can create a ApiConfigLoader by implementing the module as follows.
  - You can use the `setApiConfig` and `unsetApiConfig` functions, which are passed as arguments, to immediately reflect the API setting information from the loader to the server.

```javascript
function ApiConfigCustomLoader(options, setApiConfig, unsetApiConfig) {
  // ...
}
```

You can load it from `transformium.config.js` as shown below.

```javascript
apiConfigLoaders: [
  {
    options: {
      ...
    },
    module: require("ApiConfigCustomLoader")
  }
]
```

## Why Transformium?

Transformium does not require you to restart server when adding APIs or modifying response results. You can generate the API by modifying the apiConfig file and implementing the handler function, or you can modify the API response of the existing back-end server. The handler function running on the Transformium server is designed to be inaccessible to the Node API in the handler function because it is executed in the sandbox using safe-eval. Therefore, APIConfig configuration information can be safely processed even if the user inputs it.

## Contributors

This project exists thanks to all the people who contribute.
<a href="https://github.com/stegano/transforminum/graphs/contributors"><img src="https://opencollective.com/transforminum/contributors.svg?width=890" /></a>

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