MCPcopy Index your code
hub / github.com/markmap/markmap / shutdown

Method shutdown

packages/markmap-cli/src/util/dev-server.ts:270–279  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

268 }
269
270 async shutdown() {
271 if (!this.serverInfo) throw new Error('Server is not set up yet');
272 const deferred = defer();
273 this.serverInfo.server.close((err) => {
274 if (err) deferred.reject();
275 else deferred.resolve();
276 });
277 await deferred.promise;
278 this.serverInfo = null;
279 }
280
281 async destroy() {
282 await this.shutdown();

Callers 1

destroyMethod · 0.95

Calls 1

deferFunction · 0.90

Tested by

no test coverage detected