Skip to content

connect-memorize allows to store selected middleware responses and serve them later - read - offline mode!

License

Notifications You must be signed in to change notification settings

panrafal/connect-memorize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

connect-memorize Build Status

connect-memorize allows to store selected middleware responses and serve them later - read - offline mode!

This is very handy if:

  • you want to have an offline functionality for your backend stuff, especially proxied requests in grunt.
  • you want to store anything your server replied.

Only GET requests with 200 response code get stored. So if you want to store everything, be shure to clear the browser's cache beforehand.

Usage

Install

npm install connect-memorize --save

Require

var memorize = require('connect-memorize');

Setup

var app = connect()
  .use(memorize({
        match: /^\/dynamic/, // handle only urls starting with /dynamic
        memorize: true,      // store stuff
        recall: true,        // serve previously stored
  }))
  .use(... any middleware ...)

License

Copyright ©2013 Rafal Lindemann Licensed under the MIT license.

githalytics.com alpha

About

connect-memorize allows to store selected middleware responses and serve them later - read - offline mode!

Resources

License

Stars

Watchers

Forks

Packages

No packages published