1.0.1 • Published 5 years ago

poom v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

poom

Pure nodejs framework, EXTREME FAST and LIGHT WEIGHT. It is optimized for large projects. And of course, it get best performance "poom" is not bundled with any middleware. It's only nodejs native

Installation

npm i poom -S

Examples

Typescript

import { Server, ServerConfig } from 'poom'

const yourMiddleware = async (ctx: Context, next: Function) => {
  // Return error
  if(ctx.query.isError) ctx.throws(401, 'error');

  // Return data
  ctx.data = {
    msg: 'Hello world!'
  }
  
  await next()
}

ServerConfig({
  logger: Logger.pool(),
  errorOn: {
    responseStatus: true,
    responseBody: true
  }
})

Server.use(yourMiddleware)

Server.listen({
  port: 3000,
  name: 'Test app'
}, () => {
  console.log('Callback here')
})
1.0.1

5 years ago

1.0.0

5 years ago

0.0.2

6 years ago

0.0.1

6 years ago