Skip to content
 
 

Latest commit

 

History

44 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Hello Trek Engine

const co = require('co')
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(co.wrap(function * (ctx, next) {
  yield next()
}))

// response
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

About

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

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages