StaticServer middleware to new structure