@trapts/core

1.0.2 • Public • Published

trap-core

get started

  • install

     yarn add @trapts/core
    
  • example

     import { Server } from '@trapts/core'
     import * as bodyParser from 'koa-bodyparser'
     
     const bootstrap = () => {
     	const server = new Server()
     
     	// bind cache client to context
     	server.bindToContext('cache', new Cache({ stdTTL: 86400000 }))
     	
     	// koa middleware
     	server.use(bodyParser())
     	
     	// koa keys
     	server.keys(['Hello', 'World'])
     	
     	// start
     	server.start(3000)
     }
     
     bootstrap()

Readme

Keywords

none

Package Sidebar

Install

npm i @trapts/core

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

16.6 kB

Total Files

11

Last publish

Collaborators

  • alfieri