12 lines
183 B
JavaScript
Raw Permalink Normal View History

2025-04-23 09:34:08 +08:00
'use strict';
const getPort = require('get-port');
getPort()
.then(port => process.stdout.write('' + port))
.catch(err =>
setTimeout(() => {
throw err;
}, 0)
);