New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

hud-widget

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hud-widget

An optional base to use for Project-Hud widgets

latest
npmnpm
Version
0.0.8
Version published
Weekly downloads
8
Maintainers
1
Weekly downloads
 
Created
Source

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)

FAQs

Package last updated on 20 Mar 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts