GitHub - trekjs/engine: 🚀 Micro, Elegant, Fast, Lightweight, Expressive middleware for Modern Node.js

Trek Engine

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

NPM version MIT License Codecov Linux Build Window Build

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)