moved some middleware to [root]/index.js
using index.js as main