Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
timonson committed Jul 13, 2023
1 parent 0579dc5 commit f34bc8c
Show file tree
Hide file tree
Showing 36 changed files with 473 additions and 1,179 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Setup Deno
run: |
curl -fsSL https://deno.land/x/install/install.sh | sh ${{ matrix.deno == 'old' && '-s v1.34.2' || '' }}
curl -fsSL https://deno.land/x/install/install.sh | sh ${{ matrix.deno == 'old' && '-s v1.35.0' || '' }}
echo "$HOME/.deno/bin" >> $${{ runner.os == 'Windows' && 'env:' || '' }}GITHUB_PATH
- name: Upgrade to Deno canary
if: matrix.deno == 'canary'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.*
!/.github
!/.gitignore
deno.lock
424 changes: 0 additions & 424 deletions deno.lock

This file was deleted.

26 changes: 26 additions & 0 deletions examples/server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {
type Context,
createGetRoute,
createHandler,
} from "https://dev.zaubrik.com/[email protected]/mod.ts";
import {
Ctx,
defaultCors,
defaultLogger,
fallBack,
} from "../middlewares/mod.ts";

function welcome<C extends Context>(ctx: C) {
const name = ctx.result.pathname.groups.name || "nobody";
ctx.response = new Response(`Welcome, ${name}!`);
return ctx;
}

const tryMiddleware = createGetRoute({ pathname: "/{:name}?" })(welcome);

const handler = createHandler(Ctx)(tryMiddleware)(fallBack)(
defaultLogger,
defaultCors,
);

Deno.serve({ port: 8080 }, handler);
13 changes: 13 additions & 0 deletions examples/static/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta name="description" content="" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" href="data:," />
</head>
<body>
<h1>Hello World</h1>
</body>
</html>
3 changes: 3 additions & 0 deletions functions/assertion.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function assertNever(x: never): never {
throw new Error("Unexpected value: " + x);
}
23 changes: 0 additions & 23 deletions functions/crypto/comparison.ts

This file was deleted.

119 changes: 0 additions & 119 deletions functions/crypto/crypto_key.ts

This file was deleted.

43 changes: 0 additions & 43 deletions functions/crypto/crypto_key_test.ts

This file was deleted.

44 changes: 0 additions & 44 deletions functions/crypto/hash.ts

This file was deleted.

36 changes: 0 additions & 36 deletions functions/crypto/hash_test.ts

This file was deleted.

Loading

0 comments on commit f34bc8c

Please sign in to comment.