How to use the daruk.post function in daruk

To help you get started, we’ve selected a few daruk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github darukjs / daruk / example / 01-helloWorld / controllers / index.ts View on Github external
import { BaseController, Context, get, post } from 'daruk';

export default class Index extends BaseController {
  @get('/')
  @post('/')
  public index(ctx: Context, next: Function) {
    ctx.body = 'hello world';
  }
}

daruk

a node.js web framework

MIT
Latest version published 4 months ago

Package Health Score

68 / 100
Full package analysis