diff --git a/http/README.md b/http/README.md index c598cdef45..2c9a908532 100644 --- a/http/README.md +++ b/http/README.md @@ -5,7 +5,7 @@ A framework for creating HTTP/HTTPS server. ## Example ```typescript -import { serve } from "https://deno.land/x/http/mod.ts"; +import { serve } from "https://deno.land/x/http/server.ts"; const s = serve("0.0.0.0:8000"); async function main() { diff --git a/http/file_server.ts b/http/file_server.ts index 4437a44e41..d1a34ab79a 100755 --- a/http/file_server.ts +++ b/http/file_server.ts @@ -10,7 +10,7 @@ import { ServerRequest, setContentLength, Response -} from "./mod.ts"; +} from "./server.ts"; import { cwd, DenoError, ErrorKind, args, stat, readDir, open } from "deno"; import { extname } from "../fs/path.ts"; import { contentType } from "../media_types/mod.ts"; diff --git a/http/mod.ts b/http/mod.ts deleted file mode 100644 index a89f04417a..0000000000 --- a/http/mod.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { - serve, - listenAndServe, - Response, - setContentLength, - ServerRequest -} from "./http.ts"; diff --git a/http/http.ts b/http/server.ts similarity index 100% rename from http/http.ts rename to http/server.ts diff --git a/http/http_test.ts b/http/server_test.ts similarity index 99% rename from http/http_test.ts rename to http/server_test.ts index ba0cec3e32..5fdb63ceba 100644 --- a/http/http_test.ts +++ b/http/server_test.ts @@ -12,7 +12,7 @@ import { ServerRequest, setContentLength, Response -} from "./mod.ts"; +} from "./server.ts"; import { BufWriter, BufReader } from "../io/bufio.ts"; interface ResponseTest { diff --git a/test.ts b/test.ts index 367fd4652d..07d825b625 100755 --- a/test.ts +++ b/test.ts @@ -15,7 +15,7 @@ import "fs/path/zero_length_strings_test.ts"; import "io/bufio_test.ts"; import "io/ioutil_test.ts"; import "io/util_test.ts"; -import "http/http_test.ts"; +import "http/server_test.ts"; import "http/file_server_test.ts"; import "log/test.ts"; import "log/handlers_test.ts"; diff --git a/ws/mod.ts b/ws/mod.ts index 348f5df128..ca47bf5b89 100644 --- a/ws/mod.ts +++ b/ws/mod.ts @@ -1,6 +1,6 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. import { Buffer, Writer, Conn } from "deno"; -import { ServerRequest } from "../http/http.ts"; +import { ServerRequest } from "../http/server.ts"; import { BufReader, BufWriter } from "../io/bufio.ts"; import { readLong, readShort, sliceLongToBytes } from "../io/ioutil.ts"; import { Sha1 } from "./sha1.ts"; diff --git a/ws/test.ts b/ws/test.ts index 67a1946397..252d8775bd 100644 --- a/ws/test.ts +++ b/ws/test.ts @@ -3,7 +3,7 @@ import { Buffer } from "deno"; import { BufReader } from "../io/bufio.ts"; import { test, assert, assertEqual } from "../testing/mod.ts"; import { createSecAccept, OpCode, readFrame, unmask } from "./mod.ts"; -import { serve } from "../http/http.ts"; +import { serve } from "../http/server.ts"; test(async function testReadUnmaskedTextFrame() { // unmasked single text frame with payload "Hello"