middleware and routing for sockjs