setup SharedDataMiddleware only when debug