1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/webpack-dev-server/lib/utils/runBonjour.js

21 lines
335 B
JavaScript

'use strict';
function runBonjour({ port }) {
const bonjour = require('bonjour')();
bonjour.publish({
name: 'Webpack Dev Server',
port,
type: 'http',
subtypes: ['webpack'],
});
process.on('exit', () => {
bonjour.unpublishAll(() => {
bonjour.destroy();
});
});
}
module.exports = runBonjour;