{
  "author": {
    "name": "Joshua Holbrook",
    "email": "josh@nodejitsu.com",
    "url": "http://jesusabdullah.net"
  },
  "name": "ecstatic",
  "description": "A simple static file server middleware that works with both Express and Flatiron",
  "version": "0.1.6",
  "homepage": "https://github.com/jesusabdullah/node-ecstatic",
  "repository": {
    "type": "git",
    "url": "git@github.com:jesusabdullah/node-ecstatic.git"
  },
  "main": "./lib/ecstatic.js",
  "scripts": {
    "test": "tap test/*.js"
  },
  "keywords": [
    "static",
    "web",
    "server",
    "files",
    "mime",
    "middleware"
  ],
  "engines": {
    "node": "*"
  },
  "dependencies": {
    "mime": "1.2.5",
    "ent": "0.0.x"
  },
  "devDependencies": {
    "tap": "0.0.x",
    "request": "2.2.x",
    "express": "2.5.x",
    "union": "0.1.x"
  },
  "readme": "# Ecstatic\n\nA simple static file server middleware that works with both Express and Flatiron\n\n* Built-in simple directory listings\n* Shows index.html files at directory roots when they exist\n* Use it with a raw http server, express/connect, or flatiron/union!\n\n# Examples:\n\n## express\n\n``` js\nvar express = require('express');\nvar ecstatic = require('ecstatic');\n\nvar app = express.createServer();\napp.use(ecstatic(__dirname + '/public'));\napp.listen(8080);\n\nconsole.log('Listening on :8080');\n```\n\n## union\n\n``` js\nvar union = require('union');\nvar ecstatic = require('ecstatic');\n\nunion.createServer({\n  before: [\n    ecstatic(__dirname + '/public'),\n  ]\n}).listen(8080);\n\nconsole.log('Listening on :8080');\n```\n\n## flatiron\n\n``` js\nvar union = require('union');\nvar flatiron = require('flatiron');\nvar ecstatic = require('ecstatic');\n\napp = new flatiron.App();\napp.use(flatiron.plugins.http);\n\napp.http.before = [\n  ecstatic(__dirname + '/public')\n];\n\napp.start(8080);\n\nconsole.log('Listening on :8080');\n```\n\n# API:\n\n## ecstatic(folder, opts={});\n\nPass ecstatic a folder, and it will return your middleware!\n\nTurn on cache-control with `opts.cache`, in seconds.\n\nTurn off directory listings with `opts.autoIndex === false`.\n\n### middleware(req, res, next);\n\nThis works more or less as you'd expect.\n\n## ecstatic.showDir(folder);\n\nThis returns another middleware which will attempt to show a directory view. Turning on auto-indexing is roughly equivalent to adding this middleware after an ecstatic middleware with autoindexing disabled.\n\n# Tests:\n\n    npm test\n\n# License:\n\nMIT/X11.\n",
  "_id": "ecstatic@0.1.6",
  "_from": "ecstatic"
}
