vados
TypeScript icon, indicating that this package has built-in type declarations

5.0.4 • Public • Published

vados

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

Installation

npm i vados -S

Examples

Typescript

import { Server, ServerConfig } from 'vados'

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')
})

Readme

Keywords

none

Package Sidebar

Install

npm i vados

Weekly Downloads

0

Version

5.0.4

License

ISC

Unpacked Size

16.4 kB

Total Files

15

Last publish

Collaborators

  • onapis