diff options
Diffstat (limited to '')
-rwxr-xr-x | src/nodejs/unit-http/http.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/nodejs/unit-http/http.js b/src/nodejs/unit-http/http.js new file mode 100755 index 00000000..3a25fa2f --- /dev/null +++ b/src/nodejs/unit-http/http.js @@ -0,0 +1,23 @@ + +/* + * Copyright (C) NGINX, Inc. + */ + +'use strict'; + +const server = require('unit-http/http_server'); + +const { Server } = server; + +function createServer (requestHandler) { + return new Server(requestHandler); +} + + +module.exports = { + Server, + STATUS_CODES: server.STATUS_CODES, + createServer, + IncomingMessage: server.ServerRequest, + ServerResponse: server.ServerResponse +}; |