New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

falconer

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

falconer

Falconer frontend for node and connect

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

#Node Falconer Build Status

Usage

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
app.use(upstreamApp);
app.listen(4000);

// 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
upstreamApp.get('/some/endpoint.json').complete(function(response){
	// response is an http.ClientResponse
	// response.body contains response body as a string
});

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

FAQs

Package last updated on 03 Apr 2012

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