Update server.js

Use simple, inline domain middleware.