mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
We now will send `SIGTERM` to the webserver and wait for the `timeout` before sending `SIGKILL` to it. Fixes #18209
14 lines
371 B
JavaScript
14 lines
371 B
JavaScript
const http = require('http');
|
|
|
|
const port = process.argv[2] || 3000;
|
|
|
|
const server = http.createServer(function (req, res) {
|
|
res.end('running!');
|
|
});
|
|
process.on('SIGTERM', () => console.log('received SIGTERM - ignoring'));
|
|
process.on('SIGINT', () => console.log('received SIGINT - ignoring'));
|
|
|
|
server.listen(port, () => {
|
|
console.log('listening on port', port);
|
|
});
|