mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
Rename http/http.ts to http/server.ts (denoland/deno_std#170)
Remove http/mod.ts
Original: e79cb5a31a
This commit is contained in:
parent
b400dad9b7
commit
132650cdf3
8 changed files with 6 additions and 13 deletions
|
@ -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() {
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
export {
|
||||
serve,
|
||||
listenAndServe,
|
||||
Response,
|
||||
setContentLength,
|
||||
ServerRequest
|
||||
} from "./http.ts";
|
|
@ -12,7 +12,7 @@ import {
|
|||
ServerRequest,
|
||||
setContentLength,
|
||||
Response
|
||||
} from "./mod.ts";
|
||||
} from "./server.ts";
|
||||
import { BufWriter, BufReader } from "../io/bufio.ts";
|
||||
|
||||
interface ResponseTest {
|
2
test.ts
2
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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue