Falconer frontend for node and connect

Usage no npm install needed!

<script type="module">
  import falconer from 'https://cdn.skypack.dev/falconer';


Node Falconer Build Status


Falconer = require('falconer').Falconer

// Create a Falconer instance for the upstream application
var upstreamApp = new Falconer({
    host: 'myApp.example.com',
    port: 80

// The falconer client will proxy express/connect requests to your upstream app
var app = require('express').createServer();
// or
// var app = require('connect').createServer();

// Add the client as a middleware to your app to enable proxy

// The falconer client will emit any events received from the upstream app
upstreamApp.on('someUpstreamEvent', function(payload1, payload2){
    // handle events from upstream app

// You can also easily send HTTP requests to the upstream app
// These will also query for events from the upstream app
    // response is an http.ClientResponse
    // response.body contains response body as a string

// More requests
    .json({user: {name: 'Jim Hoskins'}})
    .header('Accept', 'text/html, */*')
        'Cookie': 'name=value',
        'custom-header': 'value'
    .on('response', function(res){
        // before response data events
        // response after response end event. 
        // includes response.body