How to use the node-cleanup function in node-cleanup

To help you get started, we’ve selected a few node-cleanup 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 gramps-graphql / gramps-cli / src / dev.js View on Github external
// If something went wrong loading data sources, log it, tidy up, and die.
      console.error(error);
      await cleanUpTempDir();
      process.exit(2); // eslint-disable-line no-process-exit
    }
  }

  startGateway({
    mock,
    gateway,
    dataSourcePaths,
    loadedDataSources,
  });
};

cleanup(cleanupOnExit);

node-cleanup

installs custom cleanup handlers that run on exiting node

MIT
Latest version published 7 years ago

Package Health Score

65 / 100
Full package analysis

Popular node-cleanup functions