source: trip-planner-front/node_modules/webpack-dev-server/lib/utils/runBonjour.js@ 188ee53

Last change on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 388 bytes
Line 
1'use strict';
2
3function runBonjour({ port }) {
4 const bonjour = require('bonjour')();
5 const os = require('os');
6
7 bonjour.publish({
8 name: `Webpack Dev Server ${os.hostname()}:${port}`,
9 port,
10 type: 'http',
11 subtypes: ['webpack'],
12 });
13
14 process.on('exit', () => {
15 bonjour.unpublishAll(() => {
16 bonjour.destroy();
17 });
18 });
19}
20
21module.exports = runBonjour;
Note: See TracBrowser for help on using the repository browser.