How to use kill-port - 3 common examples

To help you get started, we’ve selected a few kill-port examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github storybookjs / storybook / lib / server / src / utils / webpack.ts View on Github external
const addServePlugin = (type: ConfigPrefix): PresetMergeAsyncFn => async (
  base,
  config
) => {
  const { host, devPorts } = await config.server;
  const port = devPorts[type];

  await killPort(port, 'tcp');

  return webpackMerge(base, {
    entry: {
      [`${type}/hmr`]: ['webpack-plugin-serve/client'],
    },
    plugins: [
      new WebpackPluginServe({
        static: base.output.path,
        client: {
          address: `${host}:${port}`,
          silent: true,
        },
        // TODO:
        // this injects quite a bit UI I don't like, would love to build something custom based on this
        // https://github.com/shellscape/webpack-plugin-serve/blob/master/lib/client/client.js
        status: true,
github tiaanduplessis / tenacious-fetch / test / setup.js View on Github external
global.stop = function () {
  server.close()
  kill(global.PORT)
}
github AztecProtocol / AZTEC / packages / extension / scripts / instances / ganacheInstance.js View on Github external
const handleClear = async () => {
        await killPort(port);
        log(`Clear process running on port ${port}`);
    };

kill-port

Kill process running on given port

MIT
Latest version published 2 years ago

Package Health Score

56 / 100
Full package analysis

Popular kill-port functions