An open API service indexing awesome lists of open source software.

https://github.com/trekjs/engine

๐Ÿš€ Micro, Elegant, Fast, Lightweight, Expressive middleware for Modern Node.js
https://github.com/trekjs/engine

Last synced: 3 months ago
JSON representation

๐Ÿš€ Micro, Elegant, Fast, Lightweight, Expressive middleware for Modern Node.js

Awesome Lists containing this project

README

        

Trek Engine

Micro, Elegant, Fast, Lightweight, Expressive middleware for Modern Node.js


NPM version
MIT License
Codecov
Linux Build
Window Build

## Features

* **Micro**.

* **Elegant**.

* **Fast**.

* **Lightweight**.

* **Expressive**.

## Installation

```console
$ npm install trek-engine --save
```

## Hello Trek Engine

```js
const Engine = require('trek-engine')
const app = new Engine()

// middleware
app.use((ctx, next) => {
// return promise
return next()
})

// async/await
app.use(async (ctx, next) => {
await next()
})

// generator
app.use({ res } => {
res.end('Hello Koa')
})

app.run(3000)
```

## Benchmarks

See [express vs koa vs toa vs trek-engine](https://github.com/trekjs/benchmarks).

* express

* koa v2

* toa

* trek-engine

---

> [fundon.me](https://fundon.me) ย ยทย 
> GitHub [@fundon](https://github.com/fundon) ย ยทย 
> Twitter [@_fundon](https://twitter.com/_fundon)