punky
Bootstrap your APIs taking advantage of the best community modules
Last updated 3 years ago by dgaubert .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install punky 
SYNC missed versions from official npm registry.

punky

Build Status js-standard-style

Bootstrap your APIs taking advantage of the best community modules

Quickstart

  • Create app.js:
'use strict'

const Punky = require('punky')
const Router = require('express').Router

const punky = new Punky(/* options */)

if (punky.app) {
  const router = Router()
  const body = new Buffer('Hello World')
  const message = body.toString('utf8')

  router.get('/', (req, res, next) => {
    req.log.info(message)
    req.metrics.increment('home')
    res.set('Content-Type', 'text/html')
    res.send(body)
  })

  punky.app.use(router)
}

punky.run().catch(punky.logger.error)
  • Run:
$ node app.js

Current Tags

  • 0.4.0                                ...           latest (3 years ago)

3 Versions

  • 0.4.0                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 3
Dependencies (7)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |