diff --git a/apps/my-remix-app/.eslintrc.cjs b/apps/my-remix-app/.eslintrc.cjs deleted file mode 100644 index 4f6f59ee..00000000 --- a/apps/my-remix-app/.eslintrc.cjs +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This is intended to be a basic starting point for linting in your app. - * It relies on recommended configs out of the box for simplicity, but you can - * and should modify this configuration to best suit your team's needs. - */ - -/** @type {import('eslint').Linter.Config} */ -module.exports = { - root: true, - parserOptions: { - ecmaVersion: "latest", - sourceType: "module", - ecmaFeatures: { - jsx: true, - }, - }, - env: { - browser: true, - commonjs: true, - es6: true, - }, - ignorePatterns: ["!**/.server", "!**/.client"], - - // Base config - extends: ["eslint:recommended"], - - overrides: [ - // React - { - files: ["**/*.{js,jsx,ts,tsx}"], - plugins: ["react", "jsx-a11y"], - extends: [ - "plugin:react/recommended", - "plugin:react/jsx-runtime", - "plugin:react-hooks/recommended", - "plugin:jsx-a11y/recommended", - ], - settings: { - react: { - version: "detect", - }, - formComponents: ["Form"], - linkComponents: [ - { name: "Link", linkAttribute: "to" }, - { name: "NavLink", linkAttribute: "to" }, - ], - "import/resolver": { - typescript: {}, - }, - }, - }, - - // Typescript - { - files: ["**/*.{ts,tsx}"], - plugins: ["@typescript-eslint", "import"], - parser: "@typescript-eslint/parser", - settings: { - "import/internal-regex": "^~/", - "import/resolver": { - node: { - extensions: [".ts", ".tsx"], - }, - typescript: { - alwaysTryTypes: true, - }, - }, - }, - extends: [ - "plugin:@typescript-eslint/recommended", - "plugin:import/recommended", - "plugin:import/typescript", - ], - }, - - // Node - { - files: [".eslintrc.cjs"], - env: { - node: true, - }, - }, - ], -}; diff --git a/apps/my-remix-app/.gitignore b/apps/my-remix-app/.gitignore deleted file mode 100644 index 46435490..00000000 --- a/apps/my-remix-app/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -node_modules - -/.cache -/build -.env -.dev.vars - -.wrangler diff --git a/apps/my-remix-app/README.md b/apps/my-remix-app/README.md deleted file mode 100644 index dec7f30b..00000000 --- a/apps/my-remix-app/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Welcome to Remix + Cloudflare! - -- 📖 [Remix docs](https://remix.run/docs) -- 📖 [Remix Cloudflare docs](https://remix.run/guides/vite#cloudflare) - -## Development - -Run the dev server: - -```sh -npm run dev -``` - -To run Wrangler: - -```sh -npm run build -npm run start -``` - -## Typegen - -Generate types for your Cloudflare bindings in `wrangler.toml`: - -```sh -npm run typegen -``` - -You will need to rerun typegen whenever you make changes to `wrangler.toml`. - -## Deployment - -First, build your app for production: - -```sh -npm run build -``` - -Then, deploy your app to Cloudflare Pages: - -```sh -npm run deploy -``` - -## Styling - -This template comes with [Tailwind CSS](https://tailwindcss.com/) already configured for a simple default starting experience. You can use whatever css framework you prefer. See the [Vite docs on css](https://vitejs.dev/guide/features.html#css) for more information. diff --git a/apps/my-remix-app/app/entry.client.tsx b/apps/my-remix-app/app/entry.client.tsx deleted file mode 100644 index 94d5dc0d..00000000 --- a/apps/my-remix-app/app/entry.client.tsx +++ /dev/null @@ -1,18 +0,0 @@ -/** - * By default, Remix will handle hydrating your app on the client for you. - * You are free to delete this file if you'd like to, but if you ever want it revealed again, you can run `npx remix reveal` ✨ - * For more information, see https://remix.run/file-conventions/entry.client - */ - -import { RemixBrowser } from "@remix-run/react"; -import { startTransition, StrictMode } from "react"; -import { hydrateRoot } from "react-dom/client"; - -startTransition(() => { - hydrateRoot( - document, - - - - ); -}); diff --git a/apps/my-remix-app/app/entry.server.tsx b/apps/my-remix-app/app/entry.server.tsx deleted file mode 100644 index 9bbdcfaa..00000000 --- a/apps/my-remix-app/app/entry.server.tsx +++ /dev/null @@ -1,56 +0,0 @@ -/** - * By default, Remix will handle generating the HTTP Response for you. - * You are free to delete this file if you'd like to, but if you ever want it revealed again, you can run `npx remix reveal` ✨ - * For more information, see https://remix.run/file-conventions/entry.server - */ - -import type { AppLoadContext, EntryContext } from "@remix-run/cloudflare"; -import { RemixServer } from "@remix-run/react"; -import { isbot } from "isbot"; -import { renderToReadableStream } from "react-dom/server"; - -const ABORT_DELAY = 5000; - -export default async function handleRequest( - request: Request, - responseStatusCode: number, - responseHeaders: Headers, - remixContext: EntryContext, - // This is ignored so we can keep it in the template for visibility. Feel - // free to delete this parameter in your app if you're not using it! - // eslint-disable-next-line @typescript-eslint/no-unused-vars - loadContext: AppLoadContext -) { - const controller = new AbortController(); - const timeoutId = setTimeout(() => controller.abort(), ABORT_DELAY); - - const body = await renderToReadableStream( - , - { - signal: controller.signal, - onError(error: unknown) { - if (!controller.signal.aborted) { - // Log streaming rendering errors from inside the shell - console.error(error); - } - responseStatusCode = 500; - }, - } - ); - - body.allReady.then(() => clearTimeout(timeoutId)); - - if (isbot(request.headers.get("user-agent") || "")) { - await body.allReady; - } - - responseHeaders.set("Content-Type", "text/html"); - return new Response(body, { - headers: responseHeaders, - status: responseStatusCode, - }); -} diff --git a/apps/my-remix-app/app/root.tsx b/apps/my-remix-app/app/root.tsx deleted file mode 100644 index c86a03eb..00000000 --- a/apps/my-remix-app/app/root.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import type { LinksFunction } from "@remix-run/cloudflare"; -import { - Links, - Meta, - Outlet, - Scripts, - ScrollRestoration, -} from "@remix-run/react"; - -import "./tailwind.css"; - -export const links: LinksFunction = () => [ - { rel: "preconnect", href: "https://fonts.googleapis.com" }, - { - rel: "preconnect", - href: "https://fonts.gstatic.com", - crossOrigin: "anonymous", - }, - { - rel: "stylesheet", - href: "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap", - }, -]; - -export function Layout({ children }: { children: React.ReactNode }) { - return ( - - - - - - - - - {children} - - - - - ); -} - -export default function App() { - return ; -} diff --git a/apps/my-remix-app/app/routes/_index.tsx b/apps/my-remix-app/app/routes/_index.tsx deleted file mode 100644 index bd077fa2..00000000 --- a/apps/my-remix-app/app/routes/_index.tsx +++ /dev/null @@ -1,131 +0,0 @@ -import type { MetaFunction } from '@remix-run/cloudflare'; - -import { Button } from '@technifit/ui/button'; -import { Typography } from '@technifit/ui/typography'; - -export const meta: MetaFunction = () => { - return [{ title: 'New Remix App' }, { name: 'description', content: 'Welcome to Remix!' }]; -}; - -export default function Index() { - return ( -
-
-
- - Welcome to Remix - -
- Remix - Remix -
-
- - -
-
- ); -} - -const resources = [ - { - href: 'https://remix.run/start/quickstart', - text: 'Quick Start (5 min)', - icon: ( - - - - ), - }, - { - href: 'https://remix.run/start/tutorial', - text: 'Tutorial (30 min)', - icon: ( - - - - ), - }, - { - href: 'https://remix.run/docs', - text: 'Remix Docs', - icon: ( - - - - ), - }, - { - href: 'https://rmx.as/discord', - text: 'Join Discord', - icon: ( - - - - ), - }, -]; diff --git a/apps/my-remix-app/app/tailwind.css b/apps/my-remix-app/app/tailwind.css deleted file mode 100644 index 315bab14..00000000 --- a/apps/my-remix-app/app/tailwind.css +++ /dev/null @@ -1,178 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -@font-face { - font-display: swap; - font-family: 'CalSans'; - src: - url('/fonts/cal-sans/CalSans-SemiBold.woff2') format('woff2'), - /* Chrome 36+, Opera 23+, Firefox 39+ */ url('/fonts/cal-sans/CalSans-SemiBold.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ -} - -@font-face { - font-display: swap; - font-family: 'Inter'; - font-style: normal; - font-weight: 100; - src: - url('/fonts/inter/inter-latin-ext-100-normal.woff2') format('woff2'), - /* Chrome 36+, Opera 23+, Firefox 39+ */ url('/fonts/inter/inter-latin-ext-100-normal.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ -} - -@font-face { - font-display: swap; - font-family: 'Inter'; - font-style: normal; - font-weight: 200; - src: - url('/fonts/inter/inter-latin-ext-200-normal.woff2') format('woff2'), - /* Chrome 36+, Opera 23+, Firefox 39+ */ url('/fonts/inter/inter-latin-ext-200-normal.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ -} - -@font-face { - font-display: swap; - font-family: 'Inter'; - font-style: normal; - font-weight: 300; - src: - url('/fonts/inter/inter-latin-ext-300-normal.woff2') format('woff2'), - /* Chrome 36+, Opera 23+, Firefox 39+ */ url('/fonts/inter/inter-latin-ext-300-normal.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ -} - -@font-face { - font-display: swap; - font-family: 'Inter'; - font-style: normal; - font-weight: 400; - src: - url('/fonts/inter/inter-latin-ext-400-normal.woff2') format('woff2'), - /* Chrome 36+, Opera 23+, Firefox 39+ */ url('/fonts/inter/inter-latin-ext-400-normal.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ -} - -@font-face { - font-display: swap; - font-family: 'Inter'; - font-style: normal; - font-weight: 500; - src: - url('/fonts/inter/inter-latin-ext-500-normal.woff2') format('woff2'), - /* Chrome 36+, Opera 23+, Firefox 39+ */ url('/fonts/inter/inter-latin-ext-500-normal.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ -} - -@font-face { - font-display: swap; - font-family: 'Inter'; - font-style: normal; - font-weight: 600; - src: - url('/fonts/inter/inter-latin-ext-600-normal.woff2') format('woff2'), - /* Chrome 36+, Opera 23+, Firefox 39+ */ url('/fonts/inter/inter-latin-ext-600-normal.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ -} - -@font-face { - font-display: swap; - font-family: 'Inter'; - font-style: normal; - font-weight: 700; - src: - url('/fonts/inter/inter-latin-ext-700-normal.woff2') format('woff2'), - /* Chrome 36+, Opera 23+, Firefox 39+ */ url('/fonts/inter/inter-latin-ext-700-normal.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ -} - -@font-face { - font-display: swap; - font-family: 'Inter'; - font-style: normal; - font-weight: 800; - src: - url('/fonts/inter/inter-latin-ext-800-normal.woff2') format('woff2'), - /* Chrome 36+, Opera 23+, Firefox 39+ */ url('/fonts/inter/inter-latin-ext-800-normal.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ -} - -@font-face { - font-display: swap; - font-family: 'Inter'; - font-style: normal; - font-weight: 900; - src: - url('/fonts/inter/inter-latin-ext-900-normal.woff2') format('woff2'), - /* Chrome 36+, Opera 23+, Firefox 39+ */ url('/fonts/inter/inter-latin-ext-900-normal.woff') format('woff'); /* Chrome 5+, Firefox 3.6+, IE 9+, Safari 5.1+ */ -} - -@layer base { - :root { - --accent-foreground: 0 0% 9%; - --accent: 0 0% 96.1%; - --background: 0 0% 100%; - --border: 0 0% 89.8%; - --card-foreground: 0 0% 3.9%; - --card: 0 0% 100%; - --destructive-foreground: 0 0% 98%; - --destructive: 0 84.2% 60.2%; - --font-cal: 'CalSans'; - --font-sans: 'Inter'; - --foreground: 0 0% 3.9%; - --input: 0 0% 89.8%; - --muted-foreground: 0 0% 45.1%; - --muted: 0 0% 96.1%; - --popover-foreground: 0 0% 3.9%; - --popover: 0 0% 100%; - --primary-foreground: 0 0% 98%; - --primary: 0 0% 9%; - --radius: 0.75rem; - --ring: 0 0% 3.9%; - --secondary-foreground: 0 0% 9%; - --secondary: 0 0% 96.1%; - --sidebar-accent-foreground: 240 5.9% 10%; - --sidebar-accent: 240 4.8% 95.9%; - --sidebar-background: 0 0% 98%; - --sidebar-border: 220 13% 91%; - --sidebar-foreground: 240 5.3% 26.1%; - --sidebar-primary-foreground: 0 0% 98%; - --sidebar-primary: 240 5.9% 10%; - --sidebar-ring: 217.2 91.2% 59.8%; - } - - .dark, - :root[class~='dark'] { - --accent-foreground: 0 0% 98%; - --accent: 0 0% 14.9%; - --background: 0 0% 3.9%; - --border: 0 0% 14.9%; - --card-foreground: 0 0% 98%; - --card: 0 0% 3.9%; - --destructive-foreground: 0 0% 98%; - --destructive: 0 62.8% 30.6%; - --font-cal: 'CalSans'; - --font-sans: 'Inter'; - --foreground: 0 0% 98%; - --input: 0 0% 14.9%; - --muted-foreground: 0 0% 63.9%; - --muted: 0 0% 14.9%; - --popover-foreground: 0 0% 98%; - --popover: 0 0% 3.9%; - --primary-foreground: 0 0% 9%; - --primary: 0 0% 98%; - --ring: 0 0% 83.1%; - --secondary-foreground: 0 0% 98%; - --secondary: 0 0% 14.9%; - --sidebar-accent-foreground: 240 4.8% 95.9%; - --sidebar-accent: 240 3.7% 15.9%; - --sidebar-background: 240 5.9% 10%; - --sidebar-border: 240 3.7% 15.9%; - --sidebar-foreground: 240 4.8% 95.9%; - --sidebar-primary-foreground: 0 0% 100%; - --sidebar-primary: 224.3 76.3% 48%; - --sidebar-ring: 217.2 91.2% 59.8%; - } -} - -@layer base { - * { - @apply border-border; - } - body { - @apply bg-background text-foreground selection:rounded selection:bg-primary/95 selection:text-primary-foreground; - } -} diff --git a/apps/my-remix-app/functions/[[path]].ts b/apps/my-remix-app/functions/[[path]].ts deleted file mode 100644 index 26a7de6b..00000000 --- a/apps/my-remix-app/functions/[[path]].ts +++ /dev/null @@ -1,8 +0,0 @@ -import { createPagesFunctionHandler } from "@remix-run/cloudflare-pages"; - -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore - the server build file is generated by `remix vite:build` -// eslint-disable-next-line import/no-unresolved -import * as build from "../build/server"; - -export const onRequest = createPagesFunctionHandler({ build }); diff --git a/apps/my-remix-app/load-context.ts b/apps/my-remix-app/load-context.ts deleted file mode 100644 index 94ca2e1d..00000000 --- a/apps/my-remix-app/load-context.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { type PlatformProxy } from "wrangler"; - -type Cloudflare = Omit, "dispose">; - -declare module "@remix-run/cloudflare" { - interface AppLoadContext { - cloudflare: Cloudflare; - } -} \ No newline at end of file diff --git a/apps/my-remix-app/package.json b/apps/my-remix-app/package.json deleted file mode 100644 index 92d92657..00000000 --- a/apps/my-remix-app/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "my-remix-app", - "private": true, - "sideEffects": false, - "type": "module", - "scripts": { - "build": "remix vite:build", - "cf-typegen": "wrangler types", - "deploy": "npm run build && wrangler pages deploy", - "dev": "remix vite:dev", - "lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .", - "preview": "npm run build && wrangler pages dev", - "start": "wrangler pages dev ./build/client", - "typecheck": "tsc", - "typegen": "wrangler types" - }, - "dependencies": { - "@remix-run/cloudflare": "^2.13.1", - "@remix-run/cloudflare-pages": "^2.13.1", - "@remix-run/react": "^2.13.1", - "@technifit/ui": "workspace:*", - "isbot": "^5.1.17", - "react": "^18.2.0", - "react-dom": "^18.2.0" - }, - "devDependencies": { - "@cloudflare/workers-types": "^4.20241022.0", - "@remix-run/dev": "^2.13.1", - "@technifit/tailwind-config": "workspace:*", - "@types/react": "^18.2.20", - "@types/react-dom": "^18.2.7", - "@typescript-eslint/eslint-plugin": "^6.7.4", - "@typescript-eslint/parser": "^6.7.4", - "autoprefixer": "^10.4.19", - "eslint": "^8.38.0", - "eslint-import-resolver-typescript": "^3.6.1", - "eslint-plugin-import": "^2.28.1", - "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-react": "^7.33.2", - "eslint-plugin-react-hooks": "^4.6.0", - "postcss": "^8.4.38", - "tailwindcss": "^3.4.4", - "typescript": "^5.1.6", - "vite": "^5.1.0", - "vite-tsconfig-paths": "^4.2.1", - "wrangler": "3.57.1" - }, - "engines": { - "node": ">=22.11.0" - } -} diff --git a/apps/my-remix-app/postcss.config.js b/apps/my-remix-app/postcss.config.js deleted file mode 100644 index 2aa7205d..00000000 --- a/apps/my-remix-app/postcss.config.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, -}; diff --git a/apps/my-remix-app/public/_headers b/apps/my-remix-app/public/_headers deleted file mode 100644 index f9e27775..00000000 --- a/apps/my-remix-app/public/_headers +++ /dev/null @@ -1,4 +0,0 @@ -/favicon.ico - Cache-Control: public, max-age=3600, s-maxage=3600 -/assets/* - Cache-Control: public, max-age=31536000, immutable diff --git a/apps/my-remix-app/public/_routes.json b/apps/my-remix-app/public/_routes.json deleted file mode 100644 index b042b3ec..00000000 --- a/apps/my-remix-app/public/_routes.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 1, - "include": ["/*"], - "exclude": ["/favicon.ico", "/assets/*"] -} diff --git a/apps/my-remix-app/public/favicon.ico b/apps/my-remix-app/public/favicon.ico deleted file mode 100644 index 8830cf68..00000000 Binary files a/apps/my-remix-app/public/favicon.ico and /dev/null differ diff --git a/apps/my-remix-app/public/logo-dark.png b/apps/my-remix-app/public/logo-dark.png deleted file mode 100644 index b24c7aee..00000000 Binary files a/apps/my-remix-app/public/logo-dark.png and /dev/null differ diff --git a/apps/my-remix-app/public/logo-light.png b/apps/my-remix-app/public/logo-light.png deleted file mode 100644 index 4490ae79..00000000 Binary files a/apps/my-remix-app/public/logo-light.png and /dev/null differ diff --git a/apps/my-remix-app/tailwind.config.ts b/apps/my-remix-app/tailwind.config.ts deleted file mode 100644 index 54152dbc..00000000 --- a/apps/my-remix-app/tailwind.config.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* This file is not used for any compilation purpose, it is only used for Tailwind Intellisense & Autocompletion in the source files */ -import type { Config } from 'tailwindcss'; - -import baseConfig from '@technifit/tailwind-config'; - -export default { - content: [ - ...baseConfig.content, - './app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}', - '../../packages/ui/src/**/*.{ts,tsx}', - ], - presets: [baseConfig], -} satisfies Config; diff --git a/apps/my-remix-app/tsconfig.json b/apps/my-remix-app/tsconfig.json deleted file mode 100644 index 857ca9db..00000000 --- a/apps/my-remix-app/tsconfig.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "include": [ - "**/*.ts", - "**/*.tsx", - "**/.server/**/*.ts", - "**/.server/**/*.tsx", - "**/.client/**/*.ts", - "**/.client/**/*.tsx" - ], - "compilerOptions": { - "lib": ["DOM", "DOM.Iterable", "ES2022"], - "types": [ - "@remix-run/cloudflare", - "vite/client", - "@cloudflare/workers-types/2023-07-01" - ], - "isolatedModules": true, - "esModuleInterop": true, - "jsx": "react-jsx", - "module": "ESNext", - "moduleResolution": "Bundler", - "resolveJsonModule": true, - "target": "ES2022", - "strict": true, - "allowJs": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "baseUrl": ".", - "paths": { - "~/*": ["./app/*"] - }, - - // Vite takes care of building everything, not tsc. - "noEmit": true - } -} diff --git a/apps/my-remix-app/vite.config.ts b/apps/my-remix-app/vite.config.ts deleted file mode 100644 index 198f5f5e..00000000 --- a/apps/my-remix-app/vite.config.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { - vitePlugin as remix, - cloudflareDevProxyVitePlugin as remixCloudflareDevProxy, -} from "@remix-run/dev"; -import { defineConfig } from "vite"; -import tsconfigPaths from "vite-tsconfig-paths"; - -declare module "@remix-run/cloudflare" { - interface Future { - v3_singleFetch: true; - } -} - -export default defineConfig({ - plugins: [ - remixCloudflareDevProxy(), - remix({ - future: { - v3_fetcherPersist: true, - v3_relativeSplatPath: true, - v3_throwAbortReason: true, - v3_singleFetch: true, - v3_lazyRouteDiscovery: true, - }, - }), - tsconfigPaths(), - ], -}); diff --git a/apps/my-remix-app/worker-configuration.d.ts b/apps/my-remix-app/worker-configuration.d.ts deleted file mode 100644 index 5b2319b3..00000000 --- a/apps/my-remix-app/worker-configuration.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// Generated by Wrangler -// After adding bindings to `wrangler.toml`, regenerate this interface via `npm run cf-typegen` -interface Env { -} diff --git a/apps/my-remix-app/wrangler.toml b/apps/my-remix-app/wrangler.toml deleted file mode 100644 index a13256b8..00000000 --- a/apps/my-remix-app/wrangler.toml +++ /dev/null @@ -1,85 +0,0 @@ -#:schema node_modules/wrangler/config-schema.json -name = "my-remix-app" -compatibility_date = "2024-10-22" -pages_build_output_dir = "./build/client" - -# Automatically place your workloads in an optimal location to minimize latency. -# If you are running back-end logic in a Pages Function, running it closer to your back-end infrastructure -# rather than the end user may result in better performance. -# Docs: https://developers.cloudflare.com/pages/functions/smart-placement/#smart-placement -# [placement] -# mode = "smart" - -# Variable bindings. These are arbitrary, plaintext strings (similar to environment variables) -# Docs: -# - https://developers.cloudflare.com/pages/functions/bindings/#environment-variables -# Note: Use secrets to store sensitive data. -# - https://developers.cloudflare.com/pages/functions/bindings/#secrets -# [vars] -# MY_VARIABLE = "production_value" - -# Bind the Workers AI model catalog. Run machine learning models, powered by serverless GPUs, on Cloudflare’s global network -# Docs: https://developers.cloudflare.com/pages/functions/bindings/#workers-ai -# [ai] -# binding = "AI" - -# Bind a D1 database. D1 is Cloudflare’s native serverless SQL database. -# Docs: https://developers.cloudflare.com/pages/functions/bindings/#d1-databases -# [[d1_databases]] -# binding = "MY_DB" -# database_name = "my-database" -# database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" - -# Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model. -# Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps. -# Docs: https://developers.cloudflare.com/workers/runtime-apis/durable-objects -# [[durable_objects.bindings]] -# name = "MY_DURABLE_OBJECT" -# class_name = "MyDurableObject" -# script_name = 'my-durable-object' - -# Bind a KV Namespace. Use KV as persistent storage for small key-value pairs. -# Docs: https://developers.cloudflare.com/pages/functions/bindings/#kv-namespaces -# [[kv_namespaces]] -# binding = "MY_KV_NAMESPACE" -# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" - -# Bind a Queue producer. Use this binding to schedule an arbitrary task that may be processed later by a Queue consumer. -# Docs: https://developers.cloudflare.com/pages/functions/bindings/#queue-producers -# [[queues.producers]] -# binding = "MY_QUEUE" -# queue = "my-queue" - -# Bind an R2 Bucket. Use R2 to store arbitrarily large blobs of data, such as files. -# Docs: https://developers.cloudflare.com/pages/functions/bindings/#r2-buckets -# [[r2_buckets]] -# binding = "MY_BUCKET" -# bucket_name = "my-bucket" - -# Bind another Worker service. Use this binding to call another Worker without network overhead. -# Docs: https://developers.cloudflare.com/pages/functions/bindings/#service-bindings -# [[services]] -# binding = "MY_SERVICE" -# service = "my-service" - -# To use different bindings for preview and production environments, follow the examples below. -# When using environment-specific overrides for bindings, ALL bindings must be specified on a per-environment basis. -# Docs: https://developers.cloudflare.com/pages/functions/wrangler-configuration#environment-specific-overrides - -######## PREVIEW environment config ######## - -# [env.preview.vars] -# API_KEY = "xyz789" - -# [[env.preview.kv_namespaces]] -# binding = "MY_KV_NAMESPACE" -# id = "" - -######## PRODUCTION environment config ######## - -# [env.production.vars] -# API_KEY = "abc123" - -# [[env.production.kv_namespaces]] -# binding = "MY_KV_NAMESPACE" -# id = ""