Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tooty

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tooty

Simple agnostic message router for node

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

tooty Circle CI

Simple agnostic message router for node.

toot toot

import tooty from "tooty";

router = tooty.build((r) => {
  // Define routes:
  r.route("users:fire", myUsersHandler.fire);
});

// You get your handler back, and can do whatever you wish
// with it from here on:
var handler = router.dispatch("users:fire", additionalData);

You can use it as the basis for:

  • Routing socket.io events to handlers
  • Routing chat bot actions to action handlers
  • Dispatching messages in a worker queue to the workers
  • Etc etc etc, you get the idea, right?

Features

  • Simple, reliable router system that takes a path/action and returns a handler
  • Fancy (and very readable) route builder inspired by Rails' Rails.application.routes#draw (optional)
  • Abstract enough that it can fit all your routing needs with a small amount of fidgeting

Installation

$ npm install --save tooty

Authors

tooty was developed by Filipe Dobreira. Contributions to the code are very welcome!

License

tooty is distributed under the MIT license. See LICENSE.

Keywords

FAQs

Package last updated on 03 Jun 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