# wyndon

> Yet Another Web Application Framework

Latest version **0.5.0** (published 2021-07-09) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2021-07-09 |
| First published | 2021-07-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 22.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Alen Yohannan |
| Maintainers | alensaito1 |
| Keywords | web, REST, API, web-framework |

## Links

- npm: https://www.npmjs.com/package/wyndon
- Repository: https://github.com/AlenSaito1/wyndon
- Homepage: https://github.com/AlenSaito1/wyndon#readme
- Issues: https://github.com/AlenSaito1/wyndon/issues
- npm.io page: https://npm.io/package/wyndon

## Dependencies (3)

- [qs](https://npm.io/package/qs.md) ^6.10.1
- [parseurl](https://npm.io/package/parseurl.md) ^1.3.3
- [finalhandler](https://npm.io/package/finalhandler.md) ^1.1.2

## 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.5.0 (latest) — 2021-07-09
- 0.4.2 — 2021-07-09
- 0.4.1 — 2021-07-09
- 0.4.0 — 2021-07-08
- 0.3.1 — 2021-07-08
- 0.3.0 — 2021-07-08
- 0.2.0 — 2021-07-08
- 0.1.2 — 2021-07-07
- 0.1.1 — 2021-07-07
- 0.1.0 — 2021-07-07
- 0.0.6 — 2021-07-07
- 0.0.5 — 2021-07-07
- 0.0.1 — 2021-07-07

## README

# Wyndon 

## Minimalist Middleware Framework

[![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)](https://www.typescriptlang.org/) [![NodeJs](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)](https://nodejs.org/en/) [![z](https://img.shields.io/npm/dw/wyndon?style=for-the-badge&logoColor=white)](https://www.npmjs.com/package/wyndon)

[![Wyndon](https://nodei.co/npm/wyndon.png)](https://www.npmjs.com/package/wyndon)

Wydon is a Modern Middleware Framework for creating HTTP servers which supports _middleware_

## Why?
Why not?
# Installation
```sh
> npm i wyndon
```
# Usage
The following code shows the procedure to create a simple Server and binding it to a PORT
```TS
import { App } from 'wyndon'
// or const { App } = require('wyndon')

// Initialize App
const app = new App()
// Add your middleware
app.use((req, res, next) => {
    // Do stuff like logging and auth here
    next()
})

app.use('/', (req, res) => {
    // Write code
    res.end('This is a cool response')
})

app.use('/hi', (req, res) => {
    res.end('Hi. Cool endpoint, right?')
})


// Bind the App to a PORT
app.listen(process.env.PORT || 5000)

//Pofit!
```

## Routing

 If you want advanced routing, you can use the `Router` class

```TS
import { App, Router } from 'wyndon'

const app = new App()


// Every method returns the modified instance. So you can chain methods
const coolRouter = new Router()
    .use('/test', (req, res) => res.end('Working'))
    .use('/json', (req, res) => res.json({ key: 'value'}))
    .use((req, res) => 'Welcome to /route')

app.use('/route', coolRouter)


```

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