# expressifier

> Make an express API for your node application with two lines.

Latest version **1.0.0** (published 2020-02-03) · MIT license · 0 weekly downloads

## Install

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

## 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 | 1.0.0 |
| Published | 2020-02-03 |
| First published | 2020-02-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | oekshido |
| Maintainers | oekshido |
| Keywords | express, api, function |

## Links

- npm: https://www.npmjs.com/package/expressifier
- Repository: https://github.com/oekshido/expressify
- Homepage: https://github.com/oekshido/expressify#readme
- Issues: https://github.com/oekshido/expressify/issues
- npm.io page: https://npm.io/package/expressifier

## Dependencies (1)

- [express](https://npm.io/package/express.md) ^4.17.1

## Recent versions

- 1.0.0 (latest) — 2020-02-03

## README

# expressifier
Make an express API for your node application with two lines.

## Installation
```
npm install expressifier
```

## Usage
```node
function foo({a=2, b=3, c=4}={}){
    return (a + b) * c
}

function bar(){
    return "test"
}

expressify = require("expressifier")
expressify({functions = [foo, bar], run = true, port = 8080})
```

## Functions

### `expressify`

#### Args

- functions: Object in `{endpoint: function}` format or list of function (endpoint will be the function's name)
- run: Whether to run or not the api directly, or just return the app. (Default is true)
- port: Which port to run the api on (Default is 8080)

#### Result

Will either return or run an API in which you can access your functions in `/endpoint`, giving the arguments in JSON as the body of your POST request.

## Limitations

- Currently, the function arguments can only have object notation due to ES's problems with unwrapping function arguments.
- Endpoints cannot be changed from POST

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