# @made-simple/express

> ---

Latest version **1.0.1** (published 2023-06-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @made-simple/express
pnpm add @made-simple/express
yarn add @made-simple/express
bun add @made-simple/express
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2023-06-29 |
| First published | 2023-06-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | alex* |
| Maintainers | alexasterisk |
| Keywords | express, simple, framework, web, server |

## Links

- npm: https://www.npmjs.com/package/@made-simple/express
- npm.io page: https://npm.io/package/@made-simple/express

## Dependencies (4)

- [cron](https://npm.io/package/cron.md) ^2.2.0
- [express](https://npm.io/package/express.md) ^4.18.2
- [callsite](https://npm.io/package/callsite.md) ^1.0.0
- [body-parser](https://npm.io/package/body-parser.md) ^1.20.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2023-06-29

## README

# @made-simple/express

---

Shifts the work of setting up an Express server to an easy to use class. Allowing you to focus on the more important stuff.

## Installation

```bash
npm install @made-simple/express
```

## Example Usage

```js
import { Server } from "@made-simple/express"
const server = new Server() // creates a new http server

server.get("/", (req, res) => {
    res.send("Hello World!")
})

server.start(3000)
```

## Examples

### Adding a folder of routes

```js
server.addFolder("./routes")
```

#### Creating a route file

```js
// ./routes/index.js

export function link(app, ...) {
    app.get(url, (req, res) => {
        res.send("Hello World!")
    })
}
```

### Running HTTPS

```js
const server = new Server("/etc/letsencrypt/live/example.com/")
server.start() // starts the server on port 443 and redirects http to https
```

### Running HTTP

```js
const server = new Server()
server.start()
```

---

## License

[MIT](https://choosealicense.com/licenses/mit/)

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
[Repository](https://github.com/made-simple/express)

## Contributors

[@alexasterisk](https://github.com/alexasterisk)

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