📜  nodejs app.on 连接 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:01.309000             🧑  作者: Mango

代码示例1
const app = express();

app.use('/', function (req, res, next) {
  // Add your code for this route here
});

const server = app.listen(3000, function () {
  console.log('Server listening on port 3000');
});

server.on('connection', function (client) {
  // Do your thang here
});