Skip to main content
Module

x/aleph/examples/react-mdx-app/server.ts

The Full-stack Framework in Deno.
Very Popular
Go to Latest
File
import { serve } from "aleph/react-server";import MDXLoader from "aleph/react/mdx-loader";import routes from "./routes/_export.ts";
// check https://mdxjs.com/docs/extending-mdximport remarkFrontmatter from "https://esm.sh/remark-frontmatter@4.0.1";import remarkGFM from "https://esm.sh/remark-gfm@3.0.1";import rehypeHighlight from "https://esm.sh/rehype-highlight@5.0.2";import rehypeSlug from "https://esm.sh/rehype-slug@5.0.1";
serve({ baseUrl: import.meta.url, loaders: [ new MDXLoader({ remarkPlugins: [remarkFrontmatter, remarkGFM], rehypePlugins: [rehypeHighlight, rehypeSlug], providerImportSource: "@mdx-js/react", }), ], router: { glob: "./routes/**/*.{tsx,mdx,md}", routes, }, ssr: true,});