Updated respond function to use res.status(200).end() as res.send(200) is deprecated.