Create index.js

Initial pass at ifEnabled middleware