在 Node.js 中,我们可以使用以下代码来关闭一个服务器: const http = require('http'); // 创建服务器 const server = http.createServer((req, res