JonathanBennett / prerender-redis-cache

MIT License
32 stars 30 forks source link

TypeError: app.use() requires middleware functions #11

Closed adriagil closed 7 years ago

adriagil commented 7 years ago

I've followed the instructions step by step but when trying to execute my Express app I get the following error: TypeError: app.use() requires middleware functions

I'm providing process.env.REDIS_URL as well as requiring the proper package: app.use(require('prerender-redis-cache'));

Anyone having this issue?

thoop commented 7 years ago

This middleware is meant for use on the Prerender server to store prerendered pages in Redis where it looks like you are trying to use this on your website. This package won't work for storing things in redis on your website.

adriagil commented 7 years ago

Yes true, I misunderstood the instructions and I was adding the package to my Express app but all I needed is to place it in the prerender server config file.

Thanks!