punky

0.4.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.4.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.4.0
    0
  • 0.2.0
    1
  • 0.1.0
    1

Package Sidebar

Install

npm i punky

Weekly Downloads

2

Version

0.4.0

License

BSD-3-Clause

Last publish

Collaborators

  • dgaubert