0.0.8 • Published 11 years ago

hud-widget v0.0.8

Weekly downloads
25
License
-
Repository
github
Last release
11 years ago

hud-widget

This is an abstraction of express to allow quick prototyping of widgets.

Usage

var Widget = new require('hud-widget')
  , widget = new Widget()

widget.get('/', function (req, res) {
  res.render('index', { title: 'Calendar' })
})

Properties

  • app Exposes express

Methods

  • get Exposes express get
  • start Starts the server
  • cache(ttl) Caches the route output, used as a middleware

Options

  • port (Integer): Port to run the service on. Defaults to the PORT env if set 3000
  • viewPath (String): Path to views (views)
  • viewEngine (String): template engine (jade)
  • favicon (Function): Middileware which handles the favicon, set to null if no favicon is wanted (express.favicon())
  • staticPath (String): Path to static content to serve (public)
  • logger (Function): Logger middleware (express.logger('dev'))
  • autoStart (Boolean): Automatically start the server on the next tick. If false, use widget.start() (true)
0.0.8

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago