refactor(server) respond: req, res -> funcs, req, res