Update server-middleware.js