added middleware to store db queries
Merge pull request #15 from BakanovKirill/middleware

added middleware to store db queries