Static file server with in-memory cache
var connect =app =buffet = root: './public' // root defaults to ./publicapp;// (non-static routes here)app;var server = ;server;
Easy built-in server
$ npm install -g buffet$ cd /var/www/html && buffet
As a request handler
var server = ;var buffet = ; // root defaults to ./publicserver;server;
root: Document root. Can also be passed as the first parameter to
indexes: True to look for
options.indexand serve it for directory requests. (Default: true)
index: Name of index file to look for. (Default:
watch: True to auto-update the buffer when files change. (Default:
notFoundPath: Path to be rendered on
defaultContentType: If the file does not have an extension, set this to specify the default
Content-Typesent to the browser. This defaults to
Running your own benchmark
make bench in the buffet directory (you'll need
Brought to you by benchmarx.
See here for my results.
Terra Eclipse, Inc. is a nationally recognized political technology and strategy firm located in Aptos, CA and Washington, D.C.
- Copyright (C) 2014 Carlos Rodriguez (http://s8f.org/)
- Copyright (C) 2014 Terra Eclipse, Inc. (http://www.terraeclipse.com/)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.