diff options
author | Alexander Borisov <alexander.borisov@nginx.com> | 2018-10-03 17:50:03 +0300 |
---|---|---|
committer | Alexander Borisov <alexander.borisov@nginx.com> | 2018-10-03 17:50:03 +0300 |
commit | ea62327b008b39dc48a51aa80343b20a0a122cd6 (patch) | |
tree | a81a4c6e61ae35d3415f5991a55a1ecdd4dde0bb /src/nodejs/unit-http/http.js | |
parent | 141ee2aa326d54eeecc2ef96f61e2d2d8068b6b1 (diff) | |
download | unit-ea62327b008b39dc48a51aa80343b20a0a122cd6.tar.gz unit-ea62327b008b39dc48a51aa80343b20a0a122cd6.tar.bz2 |
Added Node.js support.
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 +}; |