Socket
Socket
Sign inDemoInstall

hoagie

Package Overview
Dependencies
5
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    hoagie

Express-like organization for command-line applications


Version published
Weekly downloads
17
increased by112.5%
Maintainers
1
Install size
134 kB
Created
Weekly downloads
 

Readme

Source

hoagie

express-like organization for command-line applications.

NPM version Build Status

Install

$ npm install hoagie --save

Usage

// math.js

var hoagie = require('hoagie');

var app = hoagie();

app.use('add', function(req, res, next) {
	var a = parseInt(req.params[1], 10);
	var b = parseInt(req.params[2], 10);

	res.send(a + b);
});

app.run(hoagie.argv);
$ node ./math.js add 1 1
2

See the examples directory for more code samples.

app.use([command, ]fn...)

Adds each middleware function to the stack, optionally under the command space. Each middleware should be a function of the signature function(req, res, next).

Middleware

  • hoagie-session adds "session" support
  • hoagie-exec Make your hoagie program exec to another process

License

ISC License

Keywords

FAQs

Last updated on 23 Mar 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc