-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexamples.html
24 lines (22 loc) · 29.1 KB
/
examples.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Examples | Lagoss</title>
<meta name="description" content="An open-source runtime and platform that allows developers to run TypeScript and JavaScript Serverless Functions.">
<meta name="generator" content="VitePress v1.0.0-rc.44">
<link rel="preload stylesheet" href="/assets/style.Dl058EZ5.css" as="style">
<script type="module" src="/assets/app.yn0IZKkT.js"></script>
<link rel="preload" href="/assets/inter-roman-latin.Bu8hRsVA.woff2" as="font" type="font/woff2" crossorigin="">
<link rel="modulepreload" href="/assets/chunks/framework.CSd21wiM.js">
<link rel="modulepreload" href="/assets/chunks/theme.DanHaxrE.js">
<link rel="modulepreload" href="/assets/examples.md.7Ptb0G4R.lean.js">
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
</head>
<body>
<div id="app"><div class="Layout" data-v-5d98c3a5><!--[--><!--]--><!--[--><span tabindex="-1" data-v-0f60ec36></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-0f60ec36> Skip to content </a><!--]--><!----><header class="VPNav" data-v-5d98c3a5 data-v-ae24b3ad><div class="VPNavBar has-sidebar" data-v-ae24b3ad data-v-19c990f1><div class="wrapper" data-v-19c990f1><div class="container" data-v-19c990f1><div class="title" data-v-19c990f1><div class="VPNavBarTitle has-sidebar" data-v-19c990f1 data-v-ab179fa1><a class="title" href="/" data-v-ab179fa1><!--[--><!--]--><!--[--><img class="VPImage logo" src="/icon-white.png" alt data-v-8426fc1a><!--]--><span data-v-ab179fa1>Lagoss</span><!--[--><!--]--></a></div></div><div class="content" data-v-19c990f1><div class="content-body" data-v-19c990f1><!--[--><!--]--><div class="VPNavBarSearch search" data-v-19c990f1><!----></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-19c990f1 data-v-7f418b0f><span id="main-nav-aria-label" class="visually-hidden" data-v-7f418b0f>Main Navigation</span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/" tabindex="0" data-v-7f418b0f data-v-42ef59de><!--[--><span data-v-42ef59de>Home</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/introduction.html" tabindex="0" data-v-7f418b0f data-v-42ef59de><!--[--><span data-v-42ef59de>Docs</span><!--]--></a><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-19c990f1 data-v-e6aabb21><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-e6aabb21 data-v-d1f28634 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-d1f28634></span><span class="vpi-moon moon" data-v-d1f28634></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-19c990f1 data-v-0394ad82 data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/lagossapp/lagoss" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-eee4e7cb><span class="vpi-social-github" /></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-19c990f1 data-v-d0bd9dde data-v-b6c34ac9><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-b6c34ac9><span class="vpi-more-horizontal icon" data-v-b6c34ac9></span></button><div class="menu" data-v-b6c34ac9><div class="VPMenu" data-v-b6c34ac9 data-v-e7ea1737><!----><!--[--><!--[--><!----><div class="group" data-v-d0bd9dde><div class="item appearance" data-v-d0bd9dde><p class="label" data-v-d0bd9dde>Appearance</p><div class="appearance-action" data-v-d0bd9dde><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-d0bd9dde data-v-d1f28634 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-d1f28634></span><span class="vpi-moon moon" data-v-d1f28634></span><!--]--></span></span></button></div></div></div><div class="group" data-v-d0bd9dde><div class="item social-links" data-v-d0bd9dde><div class="VPSocialLinks social-links-list" data-v-d0bd9dde data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/lagossapp/lagoss" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-eee4e7cb><span class="vpi-social-github" /></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-19c990f1 data-v-e5dd9c1c><span class="container" data-v-e5dd9c1c><span class="top" data-v-e5dd9c1c></span><span class="middle" data-v-e5dd9c1c></span><span class="bottom" data-v-e5dd9c1c></span></span></button></div></div></div></div><div class="divider" data-v-19c990f1><div class="divider-line" data-v-19c990f1></div></div></div><!----></header><div class="VPLocalNav has-sidebar empty" data-v-5d98c3a5 data-v-a6f0e41e><div class="container" data-v-a6f0e41e><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-a6f0e41e><span class="vpi-align-left menu-icon" data-v-a6f0e41e></span><span class="menu-text" data-v-a6f0e41e>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-a6f0e41e data-v-d2ecc192><button data-v-d2ecc192>Return to top</button><!----></div></div></div><aside class="VPSidebar" data-v-5d98c3a5 data-v-575e6a36><div class="curtain" data-v-575e6a36></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-575e6a36><span class="visually-hidden" id="sidebar-aria-label" data-v-575e6a36> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="group" data-v-575e6a36><section class="VPSidebarItem level-0 has-active" data-v-575e6a36 data-v-93e7e794><!----><div class="items" data-v-93e7e794><!--[--><div class="VPSidebarItem level-1 is-link" data-v-93e7e794 data-v-93e7e794><div class="item" data-v-93e7e794><div class="indicator" data-v-93e7e794></div><a class="VPLink link link" href="/introduction.html" data-v-93e7e794><!--[--><p class="text" data-v-93e7e794>Introduction</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-93e7e794 data-v-93e7e794><div class="item" data-v-93e7e794><div class="indicator" data-v-93e7e794></div><a class="VPLink link link" href="/getting-started.html" data-v-93e7e794><!--[--><p class="text" data-v-93e7e794>Getting Started</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-93e7e794 data-v-93e7e794><div class="item" data-v-93e7e794><div class="indicator" data-v-93e7e794></div><a class="VPLink link link" href="/runtime-apis.html" data-v-93e7e794><!--[--><p class="text" data-v-93e7e794>Runtime APIs</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-93e7e794 data-v-93e7e794><div class="item" data-v-93e7e794><div class="indicator" data-v-93e7e794></div><a class="VPLink link link" href="/cli.html" data-v-93e7e794><!--[--><p class="text" data-v-93e7e794>CLI</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-93e7e794 data-v-93e7e794><div class="item" data-v-93e7e794><div class="indicator" data-v-93e7e794></div><a class="VPLink link link" href="/examples.html" data-v-93e7e794><!--[--><p class="text" data-v-93e7e794>Examples</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="group" data-v-575e6a36><section class="VPSidebarItem level-0 collapsible" data-v-575e6a36 data-v-93e7e794><div class="item" role="button" tabindex="0" data-v-93e7e794><div class="indicator" data-v-93e7e794></div><h2 class="text" data-v-93e7e794>Usage</h2><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-93e7e794><span class="vpi-chevron-right caret-icon" data-v-93e7e794></span></div></div><div class="items" data-v-93e7e794><!--[--><div class="VPSidebarItem level-1 is-link" data-v-93e7e794 data-v-93e7e794><div class="item" data-v-93e7e794><div class="indicator" data-v-93e7e794></div><a class="VPLink link link" href="/usage/deployments.html" data-v-93e7e794><!--[--><p class="text" data-v-93e7e794>Deployments</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-93e7e794 data-v-93e7e794><div class="item" data-v-93e7e794><div class="indicator" data-v-93e7e794></div><a class="VPLink link link" href="/usage/assets.html" data-v-93e7e794><!--[--><p class="text" data-v-93e7e794>Assets</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-93e7e794 data-v-93e7e794><div class="item" data-v-93e7e794><div class="indicator" data-v-93e7e794></div><a class="VPLink link link" href="/usage/environment-variables.html" data-v-93e7e794><!--[--><p class="text" data-v-93e7e794>Environment variables</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-93e7e794 data-v-93e7e794><div class="item" data-v-93e7e794><div class="indicator" data-v-93e7e794></div><a class="VPLink link link" href="/usage/domains.html" data-v-93e7e794><!--[--><p class="text" data-v-93e7e794>Domains</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-93e7e794 data-v-93e7e794><div class="item" data-v-93e7e794><div class="indicator" data-v-93e7e794></div><a class="VPLink link link" href="/usage/logs.html" data-v-93e7e794><!--[--><p class="text" data-v-93e7e794>Logs</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-93e7e794 data-v-93e7e794><div class="item" data-v-93e7e794><div class="indicator" data-v-93e7e794></div><a class="VPLink link link" href="/usage/cron.html" data-v-93e7e794><!--[--><p class="text" data-v-93e7e794>Cron</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-93e7e794 data-v-93e7e794><div class="item" data-v-93e7e794><div class="indicator" data-v-93e7e794></div><a class="VPLink link link" href="/usage/limits.html" data-v-93e7e794><!--[--><p class="text" data-v-93e7e794>Limits</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-93e7e794 data-v-93e7e794><div class="item" data-v-93e7e794><div class="indicator" data-v-93e7e794></div><a class="VPLink link link" href="/usage/security.html" data-v-93e7e794><!--[--><p class="text" data-v-93e7e794>Security</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="group" data-v-575e6a36><section class="VPSidebarItem level-0 collapsible collapsed" data-v-575e6a36 data-v-93e7e794><div class="item" role="button" tabindex="0" data-v-93e7e794><div class="indicator" data-v-93e7e794></div><h2 class="text" data-v-93e7e794>Self hosting</h2><div class="caret" role="button" aria-label="toggle section" tabindex="0" data-v-93e7e794><span class="vpi-chevron-right caret-icon" data-v-93e7e794></span></div></div><div class="items" data-v-93e7e794><!--[--><div class="VPSidebarItem level-1 is-link" data-v-93e7e794 data-v-93e7e794><div class="item" data-v-93e7e794><div class="indicator" data-v-93e7e794></div><a class="VPLink link link" href="/self-hosting/installation.html" data-v-93e7e794><!--[--><p class="text" data-v-93e7e794>Installation</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-93e7e794 data-v-93e7e794><div class="item" data-v-93e7e794><div class="indicator" data-v-93e7e794></div><a class="VPLink link link" href="/self-hosting/configuration.html" data-v-93e7e794><!--[--><p class="text" data-v-93e7e794>Configuration</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-5d98c3a5 data-v-1428d186><div class="VPDoc has-sidebar has-aside" data-v-1428d186 data-v-39a288b8><!--[--><!--]--><div class="container" data-v-39a288b8><div class="aside" data-v-39a288b8><div class="aside-curtain" data-v-39a288b8></div><div class="aside-container" data-v-39a288b8><div class="aside-content" data-v-39a288b8><div class="VPDocAside" data-v-39a288b8 data-v-3f215769><!--[--><!--]--><!--[--><!--]--><div class="VPDocAsideOutline" role="navigation" data-v-3f215769 data-v-935f8a84><div class="content" data-v-935f8a84><div class="outline-marker" data-v-935f8a84></div><div class="outline-title" role="heading" aria-level="2" data-v-935f8a84>On this page</div><nav aria-labelledby="doc-outline-aria-label" data-v-935f8a84><span class="visually-hidden" id="doc-outline-aria-label" data-v-935f8a84> Table of Contents for current page </span><ul class="VPDocOutlineItem root" data-v-935f8a84 data-v-b933a997><!--[--><!--]--></ul></nav></div></div><!--[--><!--]--><div class="spacer" data-v-3f215769></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-39a288b8><div class="content-container" data-v-39a288b8><!--[--><!--]--><main class="main" data-v-39a288b8><div style="position:relative;" class="vp-doc _examples" data-v-39a288b8><div><h1 id="examples" tabindex="-1">Examples <a class="header-anchor" href="#examples" aria-label="Permalink to "Examples""></a></h1><p>We have set up many examples using different libraries and frameworks. Each example has a <code>lagoss-dev</code> script that uses <a href="./cli.html#lagoss-dev"><code>lagoss dev</code></a> to start the example locally, in a few seconds.</p><h2 id="basics" tabindex="-1">Basics <a class="header-anchor" href="#basics" aria-label="Permalink to "Basics""></a></h2><h3 id="fetch-an-api" tabindex="-1">Fetch an API <a class="header-anchor" href="#fetch-an-api" aria-label="Permalink to "Fetch an API""></a></h3><p>This example uses <a href="./runtime-apis.html#fetch"><code>fetch()</code></a> to fetch an API and return the result. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/fetch-api" target="_blank" rel="noreferrer">See the code</a></p><h3 id="reply-with-html" tabindex="-1">Reply with HTML <a class="header-anchor" href="#reply-with-html" aria-label="Permalink to "Reply with HTML""></a></h3><p>This example replies with HTML, setting the proper <code>Content-Type</code> header. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/reply-with-html" target="_blank" rel="noreferrer">See the code</a></p><h3 id="reply-with-json" tabindex="-1">Reply with JSON <a class="header-anchor" href="#reply-with-json" aria-label="Permalink to "Reply with JSON""></a></h3><p>This example replies with JSON, setting the proper <code>Content-Type</code> header. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/reply-with-json" target="_blank" rel="noreferrer">See the code</a></p><h2 id="libraries" tabindex="-1">Libraries <a class="header-anchor" href="#libraries" aria-label="Permalink to "Libraries""></a></h2><h3 id="drizzle-with-turso" tabindex="-1">Drizzle with Turso <a class="header-anchor" href="#drizzle-with-turso" aria-label="Permalink to "Drizzle with Turso""></a></h3><p>This example uses <a href="https://github.com/drizzle-team/drizzle-orm" target="_blank" rel="noreferrer">Drizzle</a>, a TypeScript ORM that has a SQL-like syntax with <a href="https://turso.tech" target="_blank" rel="noreferrer">Turso</a> as a distributed SQLite database, with typesafe queries and migrations. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/drizzle-turso" target="_blank" rel="noreferrer">See the code</a></p><h3 id="hattip" tabindex="-1">HatTip <a class="header-anchor" href="#hattip" aria-label="Permalink to "HatTip""></a></h3><p>This example uses <a href="https://github.com/hattipjs/hattip" target="_blank" rel="noreferrer">HatTip</a>, a minimalist express-like library that runs anywhere, via Lagoss's adapter. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/hattip" target="_blank" rel="noreferrer">See the code</a></p><h3 id="hono" tabindex="-1">Hono <a class="header-anchor" href="#hono" aria-label="Permalink to "Hono""></a></h3><p>This example uses <a href="https://honojs.dev" target="_blank" rel="noreferrer">Hono</a>, a small, simple, and ultrafast web framework, via Lagoss's adapter. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/hono" target="_blank" rel="noreferrer">See the code</a></p><h3 id="nitro" tabindex="-1">Nitro <a class="header-anchor" href="#nitro" aria-label="Permalink to "Nitro""></a></h3><p>This example uses <a href="https://nitro.unjs.io/" target="_blank" rel="noreferrer">Nitro</a>, a library to build and deploy universal JavaScript servers, via Lagoss's preset. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/nitro" target="_blank" rel="noreferrer">See the code</a></p><h3 id="neon" tabindex="-1">Neon <a class="header-anchor" href="#neon" aria-label="Permalink to "Neon""></a></h3><p>This example uses <a href="https://neon.tech" target="_blank" rel="noreferrer">Neon</a> with their Serverless driver (<code>@neondatabase/serverless</code>) to make PostgreSQL queries on the edge. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/neon" target="_blank" rel="noreferrer">See the code</a></p><h3 id="planetscale-serverless-driver" tabindex="-1">PlanetScale Serverless Driver <a class="header-anchor" href="#planetscale-serverless-driver" aria-label="Permalink to "PlanetScale Serverless Driver""></a></h3><p>This example uses <a href="https://planetscale.com" target="_blank" rel="noreferrer">PlanetScale</a> with their Serverless Driver (<code>@planetscale/database</code>) to make SQL queries on the edge. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/planetscale" target="_blank" rel="noreferrer">See the code</a></p><h3 id="preact-csr" tabindex="-1">Preact CSR <a class="header-anchor" href="#preact-csr" aria-label="Permalink to "Preact CSR""></a></h3><p>This example uses <a href="https://preactjs.com" target="_blank" rel="noreferrer">Preact</a> to client-side render an app. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/preact" target="_blank" rel="noreferrer">See the code</a></p><h3 id="preact-srr" tabindex="-1">Preact SRR <a class="header-anchor" href="#preact-srr" aria-label="Permalink to "Preact SRR""></a></h3><p>This example uses <a href="https://preactjs.com" target="_blank" rel="noreferrer">Preact</a> to server-side render an app and hydrate on the client. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/preact-ssr" target="_blank" rel="noreferrer">See the code</a></p><h3 id="react-csr" tabindex="-1">React CSR <a class="header-anchor" href="#react-csr" aria-label="Permalink to "React CSR""></a></h3><p>This example uses <a href="https://reactjs.org" target="_blank" rel="noreferrer">React</a> to client-side render an app. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/react" target="_blank" rel="noreferrer">See the code</a></p><h3 id="react-ssr" tabindex="-1">React SSR <a class="header-anchor" href="#react-ssr" aria-label="Permalink to "React SSR""></a></h3><p>This example uses <a href="https://reactjs.org" target="_blank" rel="noreferrer">React</a> to server-side render an app and hydrate on the client. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/react-ssr" target="_blank" rel="noreferrer">See the code</a></p><h3 id="react-ssr-with-streaming" tabindex="-1">React SSR with streaming <a class="header-anchor" href="#react-ssr-with-streaming" aria-label="Permalink to "React SSR with streaming""></a></h3><p>This example uses <a href="https://reactjs.org" target="_blank" rel="noreferrer">React</a> to server-side render an app, stream the HTML, and hydrate on the client. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/react-streaming" target="_blank" rel="noreferrer">See the code</a></p><h3 id="satori" tabindex="-1">Satori <a class="header-anchor" href="#satori" aria-label="Permalink to "Satori""></a></h3><p>This example uses <a href="https://github.com/vercel/satori" target="_blank" rel="noreferrer">Satori</a> to render React and HTML/CSS to SVG. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/satori" target="_blank" rel="noreferrer">See the code</a></p><h3 id="sidra" tabindex="-1">Sidra <a class="header-anchor" href="#sidra" aria-label="Permalink to "Sidra""></a></h3><p>This example uses <a href="https://npmjs.com/sidra" target="_blank" rel="noreferrer">Sidra</a>, a library to create servers using TypeScript decorators with NestJS-like API. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/sidra" target="_blank" rel="noreferrer">See the code</a></p><h3 id="turso" tabindex="-1">Turso <a class="header-anchor" href="#turso" aria-label="Permalink to "Turso""></a></h3><p>This example uses <a href="https://turso.tech" target="_blank" rel="noreferrer">Turso</a> to make SQLite queries on the edge. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/turso" target="_blank" rel="noreferrer">See the code</a></p><h3 id="trpc" tabindex="-1">tRPC <a class="header-anchor" href="#trpc" aria-label="Permalink to "tRPC""></a></h3><p>This example uses <a href="https://trpc.io" target="_blank" rel="noreferrer">tRPC</a> server, to build typesafe APIs. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/trpc" target="_blank" rel="noreferrer">See the code</a></p><h3 id="upstash-redis" tabindex="-1">Upstash Redis <a class="header-anchor" href="#upstash-redis" aria-label="Permalink to "Upstash Redis""></a></h3><p>This example uses <a href="https://github.com/upstash/upstash-redis" target="_blank" rel="noreferrer">Upstash Redis</a> to make Redis requests over HTTP. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/upstash" target="_blank" rel="noreferrer">See the code</a></p><h3 id="upstash-rate-limit" tabindex="-1">Upstash Rate Limit <a class="header-anchor" href="#upstash-rate-limit" aria-label="Permalink to "Upstash Rate Limit""></a></h3><p>This example uses <a href="https://github.com/upstash/ratelimit" target="_blank" rel="noreferrer">Upstash Rate Limit</a> to easily create rate limits via Redis over HTTP. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/upstash-ratelimit" target="_blank" rel="noreferrer">See the code</a></p><h3 id="vite-plugin-ssr" tabindex="-1">vite-plugin-ssr <a class="header-anchor" href="#vite-plugin-ssr" aria-label="Permalink to "vite-plugin-ssr""></a></h3><p>This example uses <a href="https://vite-plugin-ssr.com/" target="_blank" rel="noreferrer">vite-plugin-ssr</a> to render static and dynamic React pages. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/vite-plugin-ssr" target="_blank" rel="noreferrer">See the code</a></p><h3 id="xata" tabindex="-1">Xata <a class="header-anchor" href="#xata" aria-label="Permalink to "Xata""></a></h3><p>This example uses <a href="https://xata.io" target="_blank" rel="noreferrer">Xata</a>, a modern serverless type-safe database. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/xata" target="_blank" rel="noreferrer">See the code</a></p><h2 id="frameworks" tabindex="-1">Frameworks <a class="header-anchor" href="#frameworks" aria-label="Permalink to "Frameworks""></a></h2><h3 id="astro" tabindex="-1">Astro <a class="header-anchor" href="#astro" aria-label="Permalink to "Astro""></a></h3><p>This example uses <a href="https://astro.build" target="_blank" rel="noreferrer">Astro</a>, a static site generator, with both SSR via Lagoss's adapter and prerendering. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/astro" target="_blank" rel="noreferrer">See the code</a></p><h3 id="nuxt" tabindex="-1">Nuxt <a class="header-anchor" href="#nuxt" aria-label="Permalink to "Nuxt""></a></h3><p>This example uses <a href="https://nuxt.com" target="_blank" rel="noreferrer">Nuxt</a>, the intuitive web framework for Vue, with SSR via Lagoss's preset. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/nuxt" target="_blank" rel="noreferrer">See the code</a></p><h3 id="nuxt-complex" tabindex="-1">Nuxt Complex <a class="header-anchor" href="#nuxt-complex" aria-label="Permalink to "Nuxt Complex""></a></h3><p>This example uses <a href="https://nuxt.com" target="_blank" rel="noreferrer">Nuxt</a> with multiple pages, layouts, api routes and more. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/nuxt-complex" target="_blank" rel="noreferrer">See the code</a></p><h3 id="rakkas" tabindex="-1">Rakkas <a class="header-anchor" href="#rakkas" aria-label="Permalink to "Rakkas""></a></h3><p>This example uses <a href="https://rakkasjs.org" target="_blank" rel="noreferrer">Rakkas</a>, a React framework powered by Vite, with SSR via Lagoss's adapter. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/rakkas" target="_blank" rel="noreferrer">See the code</a></p><h3 id="remix" tabindex="-1">Remix <a class="header-anchor" href="#remix" aria-label="Permalink to "Remix""></a></h3><p>This example uses <a href="https://remix.run" target="_blank" rel="noreferrer">Remix</a>, a full-stack React framework, with SSR via Lagoss's integration. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/remix" target="_blank" rel="noreferrer">See the code</a></p><h3 id="sveltekit" tabindex="-1">SvelteKit <a class="header-anchor" href="#sveltekit" aria-label="Permalink to "SvelteKit""></a></h3><p>This example uses <a href="https://kit.svelte.dev" target="_blank" rel="noreferrer">SvelteKit</a>, the Svelte framework, with SSR via Lagoss's adapter. <a href="https://github.com/lagossapp/lagoss/tree/main/examples/sveltekit" target="_blank" rel="noreferrer">See the code</a></p></div></div></main><footer class="VPDocFooter" data-v-39a288b8 data-v-09de1c0f><!--[--><!--]--><!----><nav class="prev-next" data-v-09de1c0f><div class="pager" data-v-09de1c0f><a class="VPLink link pager-link prev" href="/cli.html" data-v-09de1c0f><!--[--><span class="desc" data-v-09de1c0f>Previous page</span><span class="title" data-v-09de1c0f>CLI</span><!--]--></a></div><div class="pager" data-v-09de1c0f><a class="VPLink link pager-link next" href="/usage/deployments.html" data-v-09de1c0f><!--[--><span class="desc" data-v-09de1c0f>Next page</span><span class="title" data-v-09de1c0f>Deployments</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
<script>window.__VP_HASH_MAP__=JSON.parse("{\"usage_account.md\":\"C9_xtxIe\",\"usage_logs.md\":\"CYi1T4oK\",\"self-hosting_installation.md\":\"DbP0ZG9Q\",\"usage_regions.md\":\"-dhRGrOk\",\"usage_assets.md\":\"C6GaJV4X\",\"usage_cron.md\":\"B3vI2t5q\",\"usage_deployments.md\":\"DrmzjEhc\",\"index.md\":\"BcD_NlRD\",\"usage_security.md\":\"li7Tnvjy\",\"usage_domains.md\":\"Dd091cC_\",\"contributing.md\":\"yZsRwz4D\",\"self-hosting_configuration.md\":\"C3WX_j5_\",\"usage_limits.md\":\"C0jqZFQy\",\"usage_pricing.md\":\"lJNWBUap\",\"runtime-apis.md\":\"jbG-txpu\",\"cli.md\":\"DQYfCWmm\",\"getting-started.md\":\"DgBv55-U\",\"usage_environment-variables.md\":\"DU_oi06y\",\"examples.md\":\"7Ptb0G4R\",\"introduction.md\":\"Ce0dD3Ro\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Lagoss\",\"description\":\"An open-source runtime and platform that allows developers to run TypeScript and JavaScript Serverless Functions.\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"/icon-white.png\",\"nav\":[{\"text\":\"Home\",\"link\":\"/\"},{\"text\":\"Docs\",\"link\":\"/introduction\"}],\"sidebar\":[{\"text\":\"Introduction\",\"link\":\"/introduction\"},{\"text\":\"Getting Started\",\"link\":\"/getting-started\"},{\"text\":\"Runtime APIs\",\"link\":\"/runtime-apis\"},{\"text\":\"CLI\",\"link\":\"/cli\"},{\"text\":\"Examples\",\"link\":\"/examples\"},{\"text\":\"Usage\",\"collapsed\":false,\"items\":[{\"text\":\"Deployments\",\"link\":\"/usage/deployments\"},{\"text\":\"Assets\",\"link\":\"/usage/assets\"},{\"text\":\"Environment variables\",\"link\":\"/usage/environment-variables\"},{\"text\":\"Domains\",\"link\":\"/usage/domains\"},{\"text\":\"Logs\",\"link\":\"/usage/logs\"},{\"text\":\"Cron\",\"link\":\"/usage/cron\"},{\"text\":\"Limits\",\"link\":\"/usage/limits\"},{\"text\":\"Security\",\"link\":\"/usage/security\"}]},{\"text\":\"Self hosting\",\"collapsed\":true,\"items\":[{\"text\":\"Installation\",\"link\":\"/self-hosting/installation\"},{\"text\":\"Configuration\",\"link\":\"/self-hosting/configuration\"}]}],\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/lagossapp/lagoss\"}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
</body>
</html>