fennec-be/test/__mocks__/deploy-service/test.js

17 lines
381 B
JavaScript
Raw Permalink Normal View History

2021-09-08 23:04:11 +08:00
import { createServer } from 'http';
var app = createServer(function (req, res) {
res.writeHead(200);
setTimeout(() => {
res.end('pm2');
}, 2000);
});
var listener = app.listen(33333, function () {
console.log('Listening on port ' + listener.address().port);
setTimeout(() => {
// Here we send the ready signal to PM2
process.send('ready');
}, 5000);
});