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

dpd-router-event

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dpd-router-event

Deployd module to create a router event which runs always before target events are run.

  • 1.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Router Event Resource

A fork to dpd-event-callback to create events that run before target events are run.

It works with a router middleware to ensure this happens.

Installation

$ npm install dpd-router-event dpd-router-middleware --save

Usage

The following methods have been provided to indicate intent:

  1. skip: Only available the ON BEFOREREQUEST event and indicates that the method event should be skipped and the actual resource request event should be executed.
  2. proceed: Available on all events except the ON BEFOREREQUEST and indicates that the actual resource request event should be run. It takes not parameters.
  3. kill: Terminates the routing and sends a response. Parameters are error and response.
  4. killIf: Calls the kill method if the logic is true. Parameters are logic, error and response.

NOTE: method setResult has been removed to mark a major difference between router events and normal events.

Also

Apart from the apis provided by dpd-event-callback (body, query, etc), resource has also been added and holds the actual resource requested.

Keywords

FAQs

Package last updated on 11 Aug 2019

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