# @awesomeorganization/servers

> [ESM] The easiest way to create http, http2, https, https2, tcp, tls, udp servers in Node.js

Latest version **2.0.2** (published 2022-06-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @awesomeorganization/servers
pnpm add @awesomeorganization/servers
yarn add @awesomeorganization/servers
bun add @awesomeorganization/servers
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2022-06-09 |
| First published | 2020-09-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=16.0.0 |
| Dependencies | 0 |
| Unpacked size | 10.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | sergeysedoy97 |
| Maintainers | sergey.sedoy.97 |
| Keywords | http, http2, https, https2, server, servers, tcp, tls, udp |

## Links

- npm: https://www.npmjs.com/package/@awesomeorganization/servers
- Repository: https://github.com/awesomeorganization/servers
- Issues: https://github.com/awesomeorganization/servers/issues
- npm.io page: https://npm.io/package/@awesomeorganization/servers

## Recent versions

- 2.0.2 (latest) — 2022-06-09
- 2.0.1 — 2022-03-15
- 2.0.0 — 2022-03-15
- 1.1.0 — 2021-09-24
- 1.0.2 — 2021-04-27
- 1.0.1 — 2021-04-20
- 1.0.0 — 2021-04-09
- 0.2.2 — 2021-02-26
- 0.2.1 — 2021-02-25
- 0.2.0 — 2021-02-25
- 0.1.2 — 2020-09-17
- 0.1.1 — 2020-09-14
- 0.1.0 — 2020-09-03

## README

# @awesomeorganization/servers

:boom: [ESM] The easiest way to create http, http2, https, https2, tcp, tls, udp servers in Node.js

---

![GitHub Workflow](https://img.shields.io/github/workflow/status/awesomeorganization/servers/npm-publish?style=flat-square)
![Codacy](https://img.shields.io/codacy/grade/6f224801be0543b99e8ee12db87f9316?style=flat-square)
![CodeFactor](https://img.shields.io/codefactor/grade/github/awesomeorganization/servers?style=flat-square)
![Snyk](https://img.shields.io/snyk/vulnerabilities/npm/@awesomeorganization/servers?style=flat-square)
![Depfu](https://img.shields.io/depfu/awesomeorganization/servers?style=flat-square)
![npms.io](https://img.shields.io/npms-io/final-score/@awesomeorganization/servers?style=flat-square)

---

## Install

```sh
npm install @awesomeorganization/servers
```

## Example

Full example in `/example` folder.

```js
import { LOCALHOST_CERT, LOCALHOST_KEY, http, https, https2 } from '@awesomeorganization/servers'

const example = () => {
  http({
    handlers: {
      request(_request, response) {
        response.end('Hi!')
      },
    },
    listenOptions: {
      host: '127.0.0.1',
      port: 3000,
    },
  })
  https({
    createOptions: {
      cert: LOCALHOST_CERT,
      key: LOCALHOST_KEY,
    },
    handlers: {
      request(_request, response) {
        response.end('Hi!')
      },
    },
    listenOptions: {
      host: '127.0.0.1',
      port: 4000,
    },
  })
  https2({
    createOptions: {
      cert: LOCALHOST_CERT,
      key: LOCALHOST_KEY,
    },
    handlers: {
      stream(stream) {
        stream.end('Hi!')
      },
    },
    listenOptions: {
      host: '127.0.0.1',
      port: 5000,
    },
  })
}

example()

// TRY
// http://127.0.0.1:3000/
// https://127.0.0.1:4000/
// https://127.0.0.1:5000/
```

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