expresspial

0.2.1 • Public • Published

expresspial

About

Description

Express middleware for Espial

Author

Getting Started

Installation

npm install expresspial

Methods

redirect_to_master

Redirects request to the master node using a 307 temporary redirect. Returns a 503 if no master node is found.

var expresspial = require("expresspial");
 
app.use(expresspial.redirect_to_master);

redirect_to_slave

Redirects request to a random slave node using a 307 temporary redirect. Returns a 503 if no slave nodes are found.

var expresspial = require("expresspial");
 
app.use(expresspial.redirect_to_slave);

Package Sidebar

Install

npm i expresspial

Weekly Downloads

1

Version

0.2.1

License

GPLv2

Last publish

Collaborators

  • normanjoyner