trek-engine

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


Keywords
trek, web, app, http, application, framework, middleware, modern
License
MIT
Install
npm install trek-engine@1.0.5

Documentation

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

$ npm install trek-engine --save

Hello Trek Engine

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.

  • express

  • koa v2

  • toa

  • trek-engine


fundon.me  ·  GitHub @fundon  ·  Twitter @_fundon