mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 16:55:37 +02:00
✨ feat: Add dev website (#4)
## Description **What(what issue does this code solve/what feature does it add):** Add a qwik project where we can add API(s) and a frontend which will be used to review and deploy to AWS our docker containers for testing. **How(how does it solve it):** 1. Initialise a qwik project at `apps/www` ## Required Checklist: - [ ] I have added any necessary documentation and comments in my code (where appropriate) - [ ] I have added tests to make sure my code runs in all contexts ## Further comments
This commit is contained in:
29
apps/www/src/routes/layout.tsx
Normal file
29
apps/www/src/routes/layout.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { component$, Slot } from "@builder.io/qwik";
|
||||
import type { RequestHandler } from "@builder.io/qwik-city";
|
||||
import type { DocumentHead } from "@builder.io/qwik-city";
|
||||
|
||||
export const onGet: RequestHandler = async ({ cacheControl }) => {
|
||||
// Control caching for this request for best performance and to reduce hosting costs:
|
||||
// https://qwik.builder.io/docs/caching/
|
||||
cacheControl({
|
||||
// Always serve a cached response by default, up to a week stale
|
||||
staleWhileRevalidate: 60 * 60 * 24 * 7,
|
||||
// Max once every 5 seconds, revalidate on the server to get a fresh version of this page
|
||||
maxAge: 5,
|
||||
});
|
||||
};
|
||||
|
||||
export default component$(() => {
|
||||
return <Slot />;
|
||||
});
|
||||
|
||||
|
||||
export const head: DocumentHead = {
|
||||
title: "netris.me/dev | Build the future of gaming",
|
||||
meta: [
|
||||
{
|
||||
name: "description",
|
||||
content: "Play with your friends right from your browser",
|
||||
},
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user