settle

Express/Connect middleware that serves local or remote static files

Use module Broker instead
Last updated 12 years ago by scottcorgan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install settle 
SYNC missed versions from official npm registry.

settle

Express/Connect middleware that serves local or remote static files.

Install

npm install settle --save

Usage

Serve static files

var express = require('express');
var settle = require('settle');

var app = express();

app.use(settle({
  root: '/public'
}));

app.listen(3000, function () {

});

Proxy remote files

var express = require('express');
var settle = require('settle');

var app = express();

app.use(settle({
  root: 'http://proxyserver.com'
}));

app.listen(3000, function () {

});

settle([options])

  • options - the options are similar to the send module because it uses this to serve local static files. Here are a few:
    • root - the root directory if serving local files or the url to prepend to requests to proxy remote static files
    • index - a string or array of strings that define the directory index file
    • dotfiles - how to handle files that begin with a dot. These are usually hidden files. The default value is ignore. Available options:
      • allow - No special treatment for dotfiles
      • deny - Send a 403 for any request for a dotfile
      • ignore - Pretend like the dotfile does not exist and 404

Run Tests

npm install
npm test

Current Tags

  • 0.3.1                                ...           latest (12 years ago)

6 Versions

  • 0.3.1 [deprecated]           ...           12 years ago
  • 0.3.0 [deprecated]           ...           12 years ago
  • 0.2.0 [deprecated]           ...           12 years ago
  • 0.1.2 [deprecated]           ...           12 years ago
  • 0.1.1 [deprecated]           ...           12 years ago
  • 0.1.0 [deprecated]           ...           12 years ago
Maintainers (1)
Downloads
Total 14
Today 0
This Week 6
This Month 14
Last Day 0
Last Week 8
Last Month 0
Dependencies (4)
Dev Dependencies (6)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE