Bigpipe-content
Bigpipe plugin that will stream static content as fast as possible. If you need images or documents delivered from a public directory this bigpipe plugin will enable you to do just that. Note: files are not cached.
Features
- Uses the options#public directory and it subdirectories to serve static content
- Mime types are automatically added by the send module.
- Will delegate requests to Bigpipe#dispatch if the uri.pathname is not found.
Installation
Bigpipe-content is released in npm and can be installed using:
npm install bigpipe-content --save
To use the plugin from Bigpipe, simply add it after Bigpipe is initialized or
add it to options#plugins. bigpipe.use
will execute the plugin logic. Make sure
the plugin name is unique, e.g. content
by default.
// Usage after initializationvar content = Pipe = ; var pipe = http pages: __dirname + '/pages' public: __dirname + '/public' ;
// Usage through createServer optionsvar content = Pipe = ; var pipe = Bigpipe;
License
MIT