# exp-util

> The official utility framework for express

Latest version **0.0.0** (published 2022-09-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install exp-util
pnpm add exp-util
yarn add exp-util
bun add exp-util
```

## 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.0.0 |
| Published | 2022-09-27 |
| First published | 2022-09-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | litesprojectstudio |
| Keywords | util, express, framework, express-util, node, js |

## Links

- npm: https://www.npmjs.com/package/exp-util
- npm.io page: https://npm.io/package/exp-util

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.0.0 (latest) — 2022-09-27

## README

<img src="https://i.imgur.com/xQq5gY6_d.webp" alt="drawing" width="300"/>

The official framework for express which automatically creates express **paths**, **redirects** and **custom listen() function**!

# Getting Started
Install the NPM package in your console or shell
<br>
```
npm install exp-util@latest
```

# It's coding time!
The example code is right here:

```js
const { createRedirect, createPath, listen } = require('exp-util');
const express = require('express');
const app = express();
const port = 5000;

createRedirect({
  app: app, // You might be required to add 'app: app' in your path options since node-express dosen't actually use express in the module
  domain: 'example.com', // If blank, will throw an error
  slug: '', // If blank, the slug will be empty
  fwLinkSlug: '', // Changes the '/fwlink/?linkId=<any>' to '/<slug>/?linkId=<any>' (if blank, the follow link slug will turn into '/fwlink/?linkId=<any>' which is default)
  errorBodyMessage: '', // If blank, the error body message will turn into the default message
  linkId: 1 // If blank, will throw an error
});

createPath({
  app: app, // You might be required to add 'app: app' in your path options since node-express dosen't actually use express in the module
  path: '/', // If blank, will throw an error
  content: function(req, res) {
    res.send('Hello! This is a test with node-express!');
  } // If not a callback, will throw an error
});

listen(app, 5000); // Add the 'app' so the listen function still works! Amazing!
```

You can also use the **listen()** function if you want to have a [NODE-EXPRESS] custom built-in message!

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