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
- Host: GitHub
- URL: https://github.com/trekjs/engine
- Owner: trekjs
- License: mit
- Created: 2016-09-02T17:58:01.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-11T21:10:53.000Z (over 7 years ago)
- Last Synced: 2025-03-25T03:02:05.233Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 435 KB
- Stars: 26
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## 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)