# yet-another-http

> Node.JS HTTP server framework

Latest version **0.1.3** (published 2023-04-24) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install yet-another-http
pnpm add yet-another-http
yarn add yet-another-http
bun add yet-another-http
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2023-04-24 |
| First published | 2023-02-07 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 77.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alex Congritta |
| Maintainers | congritta |
| Keywords | http, https, server, framework, rest, api, yah |

## Links

- npm: https://www.npmjs.com/package/yet-another-http
- Repository: https://github.com/congritta/yet-another-http
- Homepage: https://yah.congritta.com
- Issues: https://github.com/congritta/yet-another-http/issues
- npm.io page: https://npm.io/package/yet-another-http

## Dependencies (4)

- [qs](https://npm.io/package/qs.md) ^6.11.0
- [@types/qs](https://npm.io/package/@types/qs.md) ^6.9.7
- [formidable](https://npm.io/package/formidable.md) ^2.1.1
- [@types/formidable](https://npm.io/package/@types/formidable.md) ^2.0.5

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2023-04-24
- 0.1.2 — 2023-02-26
- 0.1.1 — 2023-02-25
- 0.1.0 — 2023-02-07

## README

# Yet Another HTTP - My own NodeJS REST API implementation

I don't like express.js. This is too weak HTTP framework for building serious projects. It is even not available to read
POST data out of box.

I decided to write my own HTTP server implementation that allows get most features (reading POST data, context and so
on) without installing any HTTP framework.

## Docs Site

https://yah.congritta.com

## Requirements

- Node.JS v18;
- Yarn

## At the moment, my implementation\`s features:

* Built on native node http server;
* Written in Typescript;
* Various HTTP servers with instances of Server class;
* Middleware support;
* Context data over middlewares and handlers support;
* Can read POST data out of box. _JSON_, _multipart/form-data_, _urlencoded_ supported;
* Plugin API;
* Built-in error handling;
* Automatic minimizes (on production) and prettify (on development) JSON HTTP responses

## How to install

`yarn add yet-another-http`

## Server example

```typescript
import Server, {Response} from "yet-another-http";

const server = new Server(8000);

server.on("GET", "/", () => {
  return new Response(200, "Hello World");
});

server.run().then(() => {
  console.log(`HTTP Server started at http://${server.host}:${server.port}`);
});
```

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