Socket
Socket
Sign inDemoInstall

web-app-runner

Package Overview
Dependencies
75
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    web-app-runner

A simple HTTP application runner that accepts or rejects connections based on authenticated attributes including ip, user agent, etc. The server can be used stand alone or as middleware for connect or express.


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

Readme

Source

Web App Runner


A simple HTTP server targeted for single-page web applications.

Overview

Simple HTTP server that implements middleware for banning or re-routing authorized connections based on ip, agent or other requiest attributes. The server can be used stand alone or as middleware for connect or express.

Installation

npm install web-app-runner --save

Use

There are various levels of authentication that can be applied ranging from completely open to finely filtered.

Basic Web Server

// by default the server returns public/index.html
var runner = require('web-app-runner').createInstance();

runner.start();

IP Filter

The following IP Filter server with accept and reject specific IP addresses. All unknown IPs are accepted. This is modified with the acceptUnknownVisitor option parameter set to false.

var opts = {
		whiteList:[
			'127.0.0.1',
			'173.13.151.170'
		],
		blackList:[
			'173.14.151.180'
		],
		acceptUnkownVisitor:true
	},
	runner = require('web-app-runner').createInstance( opts );
	
runner.start();

Tests

Tests are in place for all implemented methods. Tests are written in mocha/chai/should and include jshint rules. To run the tests, do this:

make test



Copyright © 2015, rain city software | Version 0.90.15

Keywords

FAQs

Last updated on 23 Jul 2014

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc