summaryrefslogtreecommitdiffhomepage
path: root/src/nodejs/unit-http/http.js
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2018-10-25 19:00:07 +0300
committerAndrei Belov <defan@nginx.com>2018-10-25 19:00:07 +0300
commitdc3e83f26ce9f92a157d4332c723d531ca411b80 (patch)
treea723f2ce7d8c91527fdfb94eeae708292a705417 /src/nodejs/unit-http/http.js
parent8b37c0c70a183f19f7f4245ce0825954d8dbcaf7 (diff)
parentfd99a738e586326ee5b40a6bc3d09c64b18f394a (diff)
downloadunit-dc3e83f26ce9f92a157d4332c723d531ca411b80.tar.gz
unit-dc3e83f26ce9f92a157d4332c723d531ca411b80.tar.bz2
Merged with the default branch.1.5-1
Diffstat (limited to '')
-rwxr-xr-xsrc/nodejs/unit-http/http.js23
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
+};