New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bento-box-express

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bento-box-express

Express module for the Bento Box application framework

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Travis CI

Bento Box Express

Express extension for the Bento Box application framework

Install

npm install bento-box-express

Usage

var BentoBoxFactory = require('bento-box')
var BentoBoxExpress = require('bento-box-expresss')

var bentoEmitter = BentoBoxFactory.getInstance()

bentoEmitter.on('ready', function(bento) {
    var bentoExpress = bento.use(BentoBoxExpress)

    // Publish middleware to 'middleware' collection
    // Publish routes to 'routes' collection

    var server = bentoExpress.start()
})

Config

By default, Bento Box Express loads the express config property from Bento Box. It accepts the following config properties:

Bento Box Express can be configured in the application config using the following properties:

  • port [Number] - The listening port
  • settings [Object] - Object of Express settings. These are passed directly to express.set()

By default, Bento Box Express loads the express config property from the Bento Box application config object. This, however, can be changed by passing an alternate config property to the use method:

bento.use(BentoBoxExpress, 'otherConfig')

Routes

Routes are registered with Bento Box Express through the routes collection. The data passed to the collection should be an object containing the following properties:

  • method [String] - The HTTP method. (e.g. get, post)
  • path [String] - The path of the route
  • callback [Function] - The function to handle the request

Middleware

Middleware is registed with Bento Box Express through the middleware collection. The data passed to the collection can be one of two forms:

  • Function - The function to handle the request
  • Object - An object containing path and callback properties

Copyright (c) 2015 David Street

FAQs

Package last updated on 10 Sep 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc