Skip to content

Any chance we can use this with Browsersync as a Middleware? #31

@vviikk

Description

@vviikk

You can see that it can accept any connect compatible middlewares...

I am trying to implement it as a global, route-less middleware.

https://browsersync.io/docs/options#option-middleware

I added it as a middleware, but I'm getting a TypeError: res.header is not a function

at setHeaders (/Users/.../Sites/sample-site/node_modules/cacher/lib/Cacher.js:166:7)

I used it like:

 middleware: [
      (new cacher()).cache('seconds', 3000),
     // other working middlewares
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions