Skip to content

Commit 66674f3

Browse files
Update all dependencies
1 parent 9ba78b0 commit 66674f3

8 files changed

+86
-48
lines changed
Loading

README.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Functional HTTP server
1+
<img src="./.github/fl-word_art-http_server-reverse.svg" alt="Functional Core" width="450" />
22

33
A simple HTTP server inspired by Express and in tune with Functional Programming principles in JavaScript for Deno.
44

5-
[![deno land](http://img.shields.io/badge/available%20on-deno.land/x-lightgrey.svg?logo=deno&labelColor=black)](https://github.com/sebastienfilion/functional-http-server@v0.1.1)
5+
[![deno land](http://img.shields.io/badge/available%20on-deno.land/x-lightgrey.svg?logo=deno&labelColor=black)](https://github.com/sebastienfilion/functional-http-server@v0.3.0)
66
[![deno version](https://img.shields.io/badge/deno-^1.4.6-lightgrey?logo=deno)](https://github.com/denoland/deno)
77
[![GitHub release](https://img.shields.io/github/v/release/sebastienfilion/functional)](https://github.com/sebastienfilion/functional-http-server/releases)
88
[![GitHub licence](https://img.shields.io/github/license/sebastienfilion/functional)](https://github.com/sebastienfilion/functional-http-server/blob/v0.1.1/LICENSE)
@@ -17,9 +17,9 @@ The function takes two arguments; the first argument is the options, and the sec
1717
function that takes a `Request` and return a `Task` of a `Response`.
1818

1919
```js
20-
import Task from "https://deno.land/x/functional@v1.1.0/library/Task.js";
21-
import Response from "https://deno.land/x/functional_io@v0.5.0/library/Response.js";
22-
import startHTTPServer from "https://deno.land/x/functional_http_server@v0.1.0/library/server.js";
20+
import Task from "https://deno.land/x/functional@v1.2.1/library/Task.js";
21+
import Response from "https://deno.land/x/functional_io@v1.0.0/library/Response.js";
22+
import startHTTPServer from "https://deno.land/x/functional_http_server@v0.3.0/library/server.js";
2323

2424
startHTTPServer({ port: 8080 }, request => Task.of(Response.OK({}, request.raw)));
2525
```
@@ -44,10 +44,10 @@ The assertion function takes a `Request` and return a `Boolean`, the handling fu
4444
must return a `Task` of a `Response`.
4545

4646
```js
47-
import Task from "https://deno.land/x/functional@v1.1.0/library/Task.js";
48-
import { encodeText } from "https://deno.land/x/functional@v1.1.0/library/utilities.js";
49-
import Response from "https://deno.land/x/functional_io@v0.5.0/library/Response.js";
50-
import { route } from "https://deno.land/x/functional_http_server@v0.1.0/library/route.js";
47+
import Task from "https://deno.land/x/functional@v1.2.1/library/Task.js";
48+
import { encodeText } from "https://deno.land/x/functional@v1.2.1/library/utilities.js";
49+
import Response from "https://deno.land/x/functional_io@v1.0.0/library/Response.js";
50+
import { route } from "https://deno.land/x/functional_http_server@v0.3.0/library/route.js";
5151

5252
startHTTPServer(
5353
{ port: 8080 },
@@ -66,10 +66,10 @@ Because the pattern is common, this library also offers a collection of handler
6666
the assertion function. Each handler takes a `String` or a `RegExp` and a unary function.
6767

6868
```js
69-
import Task from "https://deno.land/x/functional@v1.1.0/library/Task.js";
70-
import { encodeText } from "https://deno.land/x/functional@v1.1.0/library/utilities.js";
71-
import Response from "https://deno.land/x/functional_io@v0.5.0/library/Response.js";
72-
import { handlers, route } from "https://deno.land/x/functional_http_server@v0.1.0/library/route.js";
69+
import Task from "https://deno.land/x/functional@v1.2.1/library/Task.js";
70+
import { encodeText } from "https://deno.land/x/functional@v1.2.1/library/utilities.js";
71+
import Response from "https://deno.land/x/functional_io@v1.0.0/library/Response.js";
72+
import { handlers, route } from "https://deno.land/x/functional_http_server@v0.3.0/library/route.js";
7373

7474
startHTTPServer(
7575
{ port: 8080 },
@@ -88,7 +88,7 @@ The binary function handler will be called with an object containing the origina
8888
and other parameters; the second argument is the body of request serialized based on the content type.
8989

9090
```js
91-
import { explodeRequest } from "https://deno.land/x/functional_http_server@v0.1.0/library/utilities.js";
91+
import { explodeRequest } from "https://deno.land/x/functional_http_server@v0.3.0/library/utilities.js";
9292

9393
startHTTPServer(
9494
{ port: 8080 },

library/route.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import {
1111
prop,
1212
test
1313
} from "https://x.nest.land/[email protected]/source/index.js";
14-
import Task from "https://deno.land/x/functional@v1.1.0/library/Task.js";
15-
import Request from "https://deno.land/x/functional_io@v0.5.0/library/Request.js";
16-
import Response from "https://deno.land/x/functional_io@v0.5.0/library/Response.js";
14+
import Task from "https://deno.land/x/functional@v1.2.1/library/Task.js";
15+
import Request from "https://deno.land/x/functional_io@v1.0.0/library/Request.js";
16+
import Response from "https://deno.land/x/functional_io@v1.0.0/library/Response.js";
1717

18-
import { assertIsRegex } from "https://deno.land/x/functional@v1.1.0/library/utilities.js";
18+
import { assertIsRegex } from "https://deno.land/x/functional@v1.2.1/library/utilities.js";
1919

2020
/**
2121
* ## Routing
@@ -27,8 +27,8 @@ import { assertIsRegex } from "https://deno.land/x/[email protected]/library/uti
2727
* must return a `Task` of a `Response`.
2828
*
2929
* ```js
30-
* import Task from "https://deno.land/x/functional@v1.1.0/library/Task.js";
31-
* import Response from "https://deno.land/x/functional_io@v0.5.0/library/Response.js";
30+
* import Task from "https://deno.land/x/functional@v1.2.1/library/Task.js";
31+
* import Response from "https://deno.land/x/functional_io@v1.0.0/library/Response.js";
3232
* import { route } from "./library/route.js";
3333
* import { encodeText } from "./library/utilities.js";
3434
*
@@ -49,8 +49,8 @@ import { assertIsRegex } from "https://deno.land/x/[email protected]/library/uti
4949
* the assertion function. Each handler takes a `String` or a `RegExp` and a unary function.
5050
*
5151
* ```js
52-
* import Task from "https://deno.land/x/functional@v1.1.0/library/Task.js";
53-
* import Response from "https://deno.land/x/functional_io@v0.5.0/library/Response.js";
52+
* import Task from "https://deno.land/x/functional@v1.2.1/library/Task.js";
53+
* import Response from "https://deno.land/x/functional_io@v1.0.0/library/Response.js";
5454
* import { handlers, route } from "./library/route.js";
5555
* import { encodeText } from "./library/utilities.js";
5656
*

library/route_test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { assert, assertEquals } from "https://deno.land/std@0.70.0/testing/asserts.ts"
2-
import Task from "https://deno.land/x/functional@v1.1.0/library/Task.js";
3-
import Request from "https://deno.land/x/functional_io@v0.5.0/library/Request.js";
4-
import Response from "https://deno.land/x/functional_io@v0.5.0/library/Response.js";
1+
import { assert, assertEquals } from "https://deno.land/std@0.79.0/testing/asserts.ts"
2+
import Task from "https://deno.land/x/functional@v1.2.1/library/Task.js";
3+
import Request from "https://deno.land/x/functional_io@v1.0.0/library/Request.js";
4+
import Response from "https://deno.land/x/functional_io@v1.0.0/library/Response.js";
55

66
import { handlers, route } from "./route.js";
77

library/server.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { gray, red } from "https://deno.land/std@0.76.0/fmt/colors.ts";
2-
import { serve, serveTLS } from "https://deno.land/std@0.74.0/http/server.ts";
1+
import { gray, red } from "https://deno.land/std@0.79.0/fmt/colors.ts";
2+
import { serve, serveTLS } from "https://deno.land/std@0.79.0/http/server.ts";
33
import { cond, curry, reduce } from "https://x.nest.land/[email protected]/source/index.js";
4-
import { encodeText } from "https://deno.land/x/functional@v1.1.0/library/utilities.js";
5-
import Request from "https://deno.land/x/functional_io@v0.5.0/library/Request.js";
6-
import Response from "https://deno.land/x/functional_io@v0.5.0/library/Response.js";
4+
import { encodeText } from "https://deno.land/x/functional@v1.2.1/library/utilities.js";
5+
import Request from "https://deno.land/x/functional_io@v1.0.0/library/Request.js";
6+
import Response from "https://deno.land/x/functional_io@v1.0.0/library/Response.js";
77

88
/**
99
* ## Simple HTTP server
@@ -13,8 +13,8 @@ import Response from "https://deno.land/x/[email protected]/library/Response.
1313
* function that takes a `Request` and return a `Task` of a `Response`.
1414
*
1515
* ```js
16-
* import Task from "https://deno.land/x/functional@v1.1.0/library/Task.js";
17-
* import Response from "https://deno.land/x/functional_io@v0.5.0/library/Response.js";
16+
* import Task from "https://deno.land/x/functional@v1.2.1/library/Task.js";
17+
* import Response from "https://deno.land/x/functional_io@v1.0.0/library/Response.js";
1818
* import startHTTPServer from "./library/server.js";
1919
*
2020
* startHTTPServer({ port: 8080 }, request => Task.of(Response.OK({}, request.raw)));

0 commit comments

Comments
 (0)