Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
Moves current README to template so version numbers are injectable
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesseanwright committed Nov 20, 2019
1 parent 7c36edb commit 724b7f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md → README.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
textResponse,
jsonResponse,
streamResponse,
} from "https://raw.githubusercontent.com/jamesseanwright/reno/v0.6.1/reno/mod.ts";
} from "https://raw.githubusercontent.com/jamesseanwright/reno/{{version}}/reno/mod.ts";

export const routes = createRouteMap([
["/home", () => textResponse("Hello world!")],
Expand Down Expand Up @@ -52,7 +52,7 @@ const router = createRouter(routes);
This, along with request handlers being [pure functions](https://en.wikipedia.org/wiki/Pure_function), makes unit testing Reno services a breeze:

```ts
import { jsonResponse, assertResponsesMatch } from "https://raw.githubusercontent.com/jamesseanwright/reno/v0.6.1/reno/mod.ts";
import { jsonResponse, assertResponsesMatch } from "https://raw.githubusercontent.com/jamesseanwright/reno/{{version}}/reno/mod.ts";
import { createRonSwansonQuoteHandler } from './routes.ts';

const createFetchStub = (response: string[]) =>
Expand Down Expand Up @@ -85,7 +85,7 @@ test({
Deno emulates the middleware pattern, [found in Express](https://expressjs.com/en/guide/using-middleware.html), favouring [function piping](https://www.sitepoint.com/function-composition-in-javascript/#theimportanceofinvocationorder) to create reusable, higher-order route handlers:

```ts
import { createRouteMap, jsonResponse, pipe } from "https://raw.githubusercontent.com/jamesseanwright/reno/v0.6.1/reno/mod.ts";
import { createRouteMap, jsonResponse, pipe } from "https://raw.githubusercontent.com/jamesseanwright/reno/{{version}}/reno/mod.ts";

const withCaching = pipe(
(req, res) => {
Expand Down

0 comments on commit 724b7f0

Please sign in to comment.