Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions learn/_components/TutorialList.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export function TutorialList(
props: { title: string; items: ({ label: string; id: string })[] },
) {
return (
<section className="mb-6">
<h2 className="text-lg font-semibold mb-3">{props.title}</h2>
<ul className="">
{props.items.map((item) => (
<li>
<a className="homepage-link mb-1 runtime-link" href={item.id}>{item.label}</a>
</li>
))}
</ul>
</section>
);
}
34 changes: 33 additions & 1 deletion learn/_pages/TutorialsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
import { TutorialList } from "../_components/TutorialList.tsx";
import { sidebar } from "../tutorials/_data.ts";

export default function TutorialPage() {
return <div>The tutorials page</div>;
const componentsPerSidebarItem = sidebar.map((item) => {
return (
<TutorialList
title={item.title}
items={item.items}
/>
);
});

return (
<main
id="content"
className="w-full px-8 pt-6 mt-16 max-w-screen-xl mx-auto mb-20"
>
<div className="pb-16 md:pb-0 w-full flex items-center">
<div className="align-middle gap-8 mb-20">
<h1 className="text-4xl md:text-6xl font-semibold mb-4">
Tutorials and guides
</h1>
<p className="max-w-prose mx-auto">
Walkthrough tutorials and guides to teach you about the Deno runtime
and how to use it with your favorite tools.
</p>
</div>
</div>
<div className="grid grid-cols-3 gap-8">
{componentsPerSidebarItem}
</div>
</main>
);
}
156 changes: 156 additions & 0 deletions learn/tutorials/_data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
import { Sidebar } from "../../types.ts";

export const sidebar = [
{
title: "Basics",
items: [
{
label: "Hello World!",
id: "/learn/tutorials/hello_world/",
},
{
label: "Fetch data",
id: "/learn/tutorials/fetch_data/",
},
{
label: "Executable scripts",
id: "/learn/tutorials/hashbang/",
},
{
label: "Updating from CommonJS to ESM",
id: "/learn/tutorials/cjs_to_esm/",
},
{
label: "Write a file server",
id: "/learn/tutorials/file_server/",
},
],
},
{
title: "Web frameworks and libraries",
items: [
{
label: "Build a React App",
id: "/learn/tutorials/react/",
},
{
label: "Build a React app with create-vite",
id: "/learn/tutorials/react/create-react/",
},
{
label: "Build a Next.js app",
id: "/learn/tutorials/next/",
},
{
label: "Build a Fresh app",
id: "https://fresh.deno.dev/docs/getting-started/create-a-project",
},
{
label: "Build a Vue app",
id: "/learn/tutorials/vue/",
},
{
label: "Use Express with Deno",
id: "/learn/tutorials/express/",
},
{
label: "How to use Apollo with Deno",
id: "/learn/tutorials/apollo/",
},
],
},
{
title: "Deploying Deno projects",
items: [
{
label: "AWS Lambda",
id: "/learn/tutorials/aws_lambda/",
},
{
label: "AWS Lightsail",
id: "/learn/tutorials/aws_lightsail/",
},
{
label: "Cloudflare workers",
id: "/learn/tutorials/cloudflare_workers/",
},
{
label: "Digital Ocean",
id: "/learn/tutorials/digital_ocean/",
},
{
label: "Google Cloud Run",
id: "/learn/tutorials/google_cloud_run/",
},
{
label: "Kinsta",
id: "/learn/tutorials/kinsta/",
},
],
},
{
title: "Connecting to Databases",
items: [
{
label: "Connecting to databases",
id: "/learn/tutorials/connecting_to_databases/",
},
{
label: "Use MySQL2 with Deno",
id: "/learn/tutorials/mysql2/",
},
{
label: "Use PlanetScale with Deno",
id: "/learn/tutorials/planetscale/",
},
{
label: "Use Redis with Deno",
id: "/learn/tutorials/redis/",
},
{
label: "Mongoose and MongoDB",
id: "/learn/tutorials/mongoose/",
},
{
label: "Use Prisma with Deno",
id: "/learn/tutorials/prisma/",
},
],
},
{
title: "Advanced",
items: [
{
label: "Create a subprocess",
id: "/learn/tutorials/subprocess/",
},
{
label: "Handle OS signals",
id: "/learn/tutorials/os_signals/",
},
{
label: "File system events",
id: "/learn/tutorials/file_system_events/",
},
{
label: "Module Metadata",
id: "/learn/tutorials/module_metadata/",
},
{
label: "File Based Routing",
id: "/learn/tutorials/file_based_routing/",
},
{
label: "Build a chat app with WebSockets",
id: "/learn/tutorials/chat_app/",
},
{
label: "Build a word finder app",
id: "/learn/tutorials/word_finder/",
}
],
},
] satisfies Sidebar;

export const sectionTitle = "Tutorials";
export const sectionHref = "/learn/tutorials";
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "How to use Apollo with Deno"
oldUrl:
- /runtime/manual/examples/how_to_with_npm/apollo/
- /runtime/manual/node/how_to_with_npm/apollo/
- /runtime/tutorials/how_to_with_npm/apollo/
---

[Apollo Server](https://www.apollographql.com/) is a GraphQL server that you can
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
title: "How to Deploy Deno to AWS Lambda"
oldUrl:
- /runtime/tutorials/aws_lambda/

---

AWS Lambda is a serverless computing service provided by Amazon Web Services. It
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: Deploy Deno to Amazon Lightsail
oldUrl: /runtime/manual/advanced/deploying_deno/aws_lightsail/
oldUrl:
- /runtime/manual/advanced/deploying_deno/aws_lightsail/
- /runtime/tutorials/aws_lightsail/
---

[Amazon Lightsail](https://aws.amazon.com/lightsail/) is the easiest and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "Chat application with WebSockets"
oldUrl:
- /runtime/manual/examples/chat_app/
- /runtime/tutorials/chat_app/
---

WebSockets are a powerful tool for building real-time applications. They allow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: "Updating from CommonJS to ESM"
oldUrl: /runtime/manual/node/cjs_to_esm
oldUrl:
- /runtime/manual/node/cjs_to_esm
- /runtime/tutorials/cjs_to_esm/
---

If your Node.js project uses CommonJS modules (e.g. it uses `require`), you'll
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: "Deploying Deno to Cloudflare Workers"
oldUrl: /runtime/manual/advanced/deploying_deno/cloudflare_workers/
oldUrl:
- /runtime/manual/advanced/deploying_deno/cloudflare_workers/
- /runtime/tutorials/cloudflare_workers/
---

Cloudflare Workers allows you to run JavaScript on Cloudflare's edge network.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: "Connecting to databases"
oldUrl:
- /runtime/tutorials/connecting_to_databases/
---

It is common for applications to store and retrieve data from databases. Deno
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: "Build a React app with create-vite"
oldUrl:
- /runtime/tutorials/how_to_with_npm/create-react/
---

[React](https://reactjs.org) is the most widely used JavaScript frontend
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: "How to deploy Deno to Digital Ocean"
oldUrl: /runtime/manual/advanced/deploying_deno/digital_ocean/
oldUrl:
- /runtime/manual/advanced/deploying_deno/digital_ocean/
- /runtime/tutorials/digital_ocean/
---

Digital Ocean is a popular cloud infrastructure provider offering a variety of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "How to use Express with Deno"
oldUrl:
- /runtime/manual/examples/how_to_with_npm/express/
- /runtime/manual/node/how_to_with_npm/express/
- /runtime/tutorials/how_to_with_npm/express/
---

[Express](https://expressjs.com/) is a popular web framework known for being
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "Fetch and stream data"
oldUrl:
- /runtime/manual/examples/fetch_data/
- /runtime/tutorials/fetch_data/
---

Deno brings several familiar Web APIs to the server-side environment. If you've
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: File-based routing
oldUrl: /examples/http-server-file-router/
oldUrl:
- /examples/http-server-file-router/
- /runtime/tutorials/file_based_routing/
---

If you've used frameworks like [Next.js](https://nextjs.org/), you might be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "Write a file server"
oldUrl:
- /runtime/manual/examples/file_server/
- /runtime/tutorials/file_server/
---

A file server listens for incoming HTTP requests and serves files from the local
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "File system events"
oldUrl:
- /runtime/manual/examples/file_system_events/
- /runtime/tutorials/file_system_events/
---

## Concepts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: "How to deploy to Google Cloud Run"
oldUrl: /runtime/manual/advanced/deploying_deno/google_cloud_run/
oldUrl:
- /runtime/manual/advanced/deploying_deno/google_cloud_run/
- /runtime/tutorials/google_cloud_run
---

[Google Cloud Run](https://cloud.google.com/run) is a managed compute platform
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "Executable scripts"
oldUrl:
- /runtime/manual/examples/hashbang/
- /runtime/tutorials/hashbang/
---

Making Deno scripts executable can come in handy when creating small tools or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Hello World"
oldUrl:
- /runtime/manual/examples/hello_world/
- /runtime/tutorials/init_project/
- /runtime/tutorials/hello_world/
---

Deno is a secure runtime for JavaScript and TypeScript.
Expand Down
4 changes: 3 additions & 1 deletion runtime/tutorials/kinsta.md → learn/tutorials/kinsta.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: "How to deploy Deno on Kinsta"
oldUrl: /runtime/manual/advanced/deploying_deno/kinsta/
oldUrl:
- /runtime/manual/advanced/deploying_deno/kinsta/
- runtime/tutorials/kinsta
---

[Kinsta Application Hosting](https://kinsta.com/application-hosting) is a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "Module metadata"
oldUrl:
- /runtime/manual/examples/module_metadata/
- /runtime/tutorials/module_metadata/
---

## Concepts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "How to use Mongoose with Deno"
oldUrl:
- /runtime/manual/examples/how_to_with_npm/mongoose/
- /runtime/tutorials/how_to_with_npm/mongoose/
---

[Mongoose](https://mongoosejs.com/) is a popular, schema-based library that
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "How to use MySQL2 with Deno"
oldUrl:
- /runtime/manual/examples/how_to_with_npm/mysql2/
- /runtime/tutorials/how_to_with_npm/mysql2/
---

[MySQL](https://www.mysql.com/) is the most popular database in the
Expand Down
Loading