Skip to content

Commit

Permalink
Merge pull request #442 from fastrodev/store
Browse files Browse the repository at this point in the history
Store
  • Loading branch information
ynwd authored Sep 17, 2024
2 parents 1df518a + b0ccf3d commit c4ea7c1
Show file tree
Hide file tree
Showing 8 changed files with 205 additions and 160 deletions.
42 changes: 42 additions & 0 deletions modules/blog/blog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[
{
"title": "Store: Key and Value Map with TTL",
"url": "/blog/store",
"date": "09/17/2024"
},
{
"title": "Collaboration and Profit Sharing",
"url": "/blog/collaboration",
"date": "06/18/2024"
},
{
"title": "Set up Tailwind on Deno",
"url": "/blog/tailwind",
"date": "01/26/2024"
},
{
"title": "Deno KV OAuth Implementation",
"url": "/blog/oauth",
"date": "11/15/2023"
},
{
"title": "renderToReadableStream",
"url": "/blog/render_to_readable_stream",
"date": "10/26/2023"
},
{
"title": "React",
"url": "/blog/react",
"date": "10/22/2023"
},
{
"title": "Preact",
"url": "/blog/preact_and_encrypted_props",
"date": "08/16/2023"
},
{
"title": "Hello",
"url": "/blog/hello",
"date": "11/15/2023"
}
]
44 changes: 2 additions & 42 deletions modules/blog/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Fastro } from "@app/mod.ts";
import tocLayout from "@app/modules/toc/toc.layout.tsx";
import tocApp from "@app/modules/toc/toc.page.tsx";
import { getSession } from "@app/utils/session.ts";
import posts from "@app/modules/blog/blog.json" with { type: "json" };

export default function (s: Fastro) {
s.page("/blog", {
Expand All @@ -17,48 +18,7 @@ export default function (s: Fastro) {
title: "Blog",
description: "Blog",
destination: "/blog",
posts: [
{
title: "Store: Key and Value Map with TTL",
url: "/blog/store",
date: "09/17/2024",
},
{
title: "Collaboration and Profit Sharing",
url: "/blog/collaboration",
date: "06/18/2024",
},
{
title: "Set up Tailwind on Deno",
url: "/blog/tailwind",
date: "01/26/2024",
},
{
title: "Deno KV OAuth Implementation",
url: "/blog/oauth",
date: "11/15/2023",
},
{
title: "renderToReadableStream",
url: "/blog/render_to_readable_stream",
date: "10/26/2023",
},
{
title: "React",
url: "/blog/react",
date: "10/22/2023",
},
{
title: "Preact",
url: "/blog/preact_and_encrypted_props",
date: "08/16/2023",
},
{
title: "Hello",
url: "/blog/hello",
date: "11/15/2023",
},
],
posts,
});
},
});
Expand Down
110 changes: 110 additions & 0 deletions modules/docs/docs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
[
{
"title": "Get Started",
"url": "/docs/start"
},
{
"title": "App Structure",
"url": "/docs/structure"
},
{
"title": "Hello World",
"url": "/docs/hello"
},
{
"title": "Hello World Context",
"url": "/docs/hello-context"
},
{
"title": "Hello JSON",
"url": "/docs/json"
},
{
"title": "Routing",
"url": "/docs/route"
},
{
"title": "URL Params",
"url": "/docs/url-params"
},
{
"title": "Query Params",
"url": "/docs/url-query"
},
{
"title": "App Middleware",
"url": "/docs/app-middleware"
},
{
"title": "Route Middleware",
"url": "/docs/route-middleware"
},
{
"title": "Markdown Middleware",
"url": "/docs/markdown"
},
{
"title": "Tailwind Middleware",
"url": "/docs/tailwind"
},
{
"title": "Static File",
"url": "/docs/static"
},
{
"title": "Hello TSX",
"url": "/docs/tsx"
},
{
"title": "TSX Component",
"url": "/docs/tsx-component"
},
{
"title": "Function Component",
"url": "/docs/fn-component"
},
{
"title": "Server Side Rendering",
"url": "/docs/ssr"
},
{
"title": "OAuth",
"url": "/docs/oauth"
},
{
"title": "MySQL",
"url": "/docs/mysql"
},
{
"title": "Postgres",
"url": "/docs/postgres"
},
{
"title": "Redis",
"url": "/docs/redis"
},
{
"title": "Mongo",
"url": "/docs/mongo"
},
{
"title": "Deno KV",
"url": "/docs/kv"
},
{
"title": "Grouping",
"url": "/docs/group"
},
{
"title": "Deployment",
"url": "/docs/deploy"
},
{
"title": "Store",
"url": "/docs/store"
},
{
"title": "Benchmarks",
"url": "/docs/benchmarks"
}
]
115 changes: 2 additions & 113 deletions modules/docs/docs.layout.tsx
Original file line number Diff line number Diff line change
@@ -1,117 +1,6 @@
import { Footer } from "@app/components/footer.tsx";
// import { InlineNav } from "@app/components/inline-nav.tsx";
import Header from "@app/components/header.tsx";

export const docToc = [
{
title: "Get Started",
url: "/docs/start",
},
{
title: "App Structure",
url: "/docs/structure",
},
{
title: "Hello World",
url: "/docs/hello",
},
{
title: "Hello World Context",
url: "/docs/hello-context",
},
{
title: "Hello JSON",
url: "/docs/json",
},
{
title: "Routing",
url: "/docs/route",
},
{
title: "URL Params",
url: "/docs/url-params",
},
{
title: "Query Params",
url: "/docs/url-query",
},
{
title: "App Middleware",
url: "/docs/app-middleware",
},
{
title: "Route Middleware",
url: "/docs/route-middleware",
},
{
title: "Markdown Middleware",
url: "/docs/markdown",
},
{
title: "Tailwind Middleware",
url: "/docs/tailwind",
},
{
title: "Static File",
url: "/docs/static",
},
{
title: "Hello TSX",
url: "/docs/tsx",
},
{
title: "TSX Component",
url: "/docs/tsx-component",
},
{
title: "Function Component",
url: "/docs/fn-component",
},
{
title: "Server Side Rendering",
url: "/docs/ssr",
},
{
title: "OAuth",
url: "/docs/oauth",
},
{
title: "MySQL",
url: "/docs/mysql",
},
{
title: "Postgres",
url: "/docs/postgres",
},
{
title: "Redis",
url: "/docs/redis",
},
{
title: "Mongo",
url: "/docs/mongo",
},
{
title: "Deno KV",
url: "/docs/kv",
},
{
title: "Grouping",
url: "/docs/group",
},
{
title: "Deployment",
url: "/docs/deploy",
},
{
title: "Store",
url: "/docs/store",
},
{
title: "Benchmarks",
url: "/docs/benchmarks",
},
];
import posts from "@app/modules/docs/docs.json" with { type: "json" };

export default function (
props: {
Expand Down Expand Up @@ -160,7 +49,7 @@ export default function (
<div
class={`hidden dark:bg-gray-950 md:flex md:flex-col md:grow md:gap-y-3 md:col-span-2 md:items-end md:text-right md:pr-6 md:pt-6 md:pb-6`}
>
{docToc.map((v) => {
{posts.map((v) => {
return <a class={`text-white`} href={v.url}>{v.title}</a>;
})}
</div>
Expand Down
4 changes: 2 additions & 2 deletions modules/docs/mod.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Fastro } from "@app/mod.ts";
import tocLayout from "@app/modules/toc/toc.layout.tsx";
import tocApp from "@app/modules/toc/toc.page.tsx";
import { docToc } from "@app/modules/docs/docs.layout.tsx";
import { getSession } from "@app/utils/session.ts";
import posts from "@app/modules/docs/docs.json" with { type: "json" };

export default function (s: Fastro) {
s.page("/docs", {
Expand All @@ -18,7 +18,7 @@ export default function (s: Fastro) {
title: "Docs",
description: "Docs",
destination: "/docs",
posts: docToc,
posts,
});
},
});
Expand Down
1 change: 1 addition & 0 deletions modules/store/store.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"key1":{"value":"hello"},"key2":{"value":"hello2","expiry":1726575487387}}
Loading

0 comments on commit c4ea7c1

Please sign in to comment.