mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
13 lines
390 B
TypeScript
13 lines
390 B
TypeScript
import * as http from 'http';
|
|
import stoppable = require('stoppable');
|
|
|
|
const server: stoppable.StoppableServer = stoppable(http.createServer());
|
|
server.stop();
|
|
|
|
const server2: stoppable.StoppableServer = stoppable(http.createServer(), 10000);
|
|
server2.stop();
|
|
|
|
const server3: stoppable.StoppableServer = stoppable(http.createServer());
|
|
server.stop((err, gracefully) => {});
|
|
server.close();
|