1 2/* 3 * Copyright (C) NGINX, Inc. 4 */ 5 6'use strict'; 7
| 1 2/* 3 * Copyright (C) NGINX, Inc. 4 */ 5 6'use strict'; 7
|
8const server = require('unit-http/http_server');
| 8const { 9 Server, 10 ServerRequest, 11 ServerResponse, 12} = require('./http_server');
|
9
| 13
|
10const { Server } = server; 11
| |
12function createServer (requestHandler) { 13 return new Server(requestHandler); 14} 15
| 14function createServer (requestHandler) { 15 return new Server(requestHandler); 16} 17
|
| 18const http = require("http")
|
16 17module.exports = {
| 19 20module.exports = {
|
| 21 ...http,
|
18 Server,
| 22 Server,
|
19 STATUS_CODES: server.STATUS_CODES,
| |
20 createServer,
| 23 createServer,
|
21 IncomingMessage: server.ServerRequest, 22 ServerResponse: server.ServerResponse
| 24 IncomingMessage: ServerRequest, 25 ServerResponse,
|
23};
| 26};
|