From 1637b864b7e05840df750d72a8e599e790fba486 Mon Sep 17 00:00:00 2001 From: Rodolphe Stoclin Date: Fri, 25 Oct 2024 11:56:00 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Update=20ExampleAppStack=20to=20?= =?UTF-8?q?deploy=20Remix=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- example/news-interactions/package.json | 2 +- example/news-interactions/vite.config.ts | 2 +- iac/ExampleWebApp.ts | 34 +++++------------------- 4 files changed, 9 insertions(+), 31 deletions(-) diff --git a/.gitignore b/.gitignore index 34b7b590b..1800dd5bc 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,7 @@ cdk.context.json **/out/ # production -/build +build # misc .DS_Store diff --git a/example/news-interactions/package.json b/example/news-interactions/package.json index 791c57d01..08f69512a 100644 --- a/example/news-interactions/package.json +++ b/example/news-interactions/package.json @@ -1,5 +1,5 @@ { - "name": "@frak-labs-example/news-interactions-remix", + "name": "@frak-labs-example/news-interactions", "version": "0.0.1", "description": "Demo of a news paper website using the Frak SDK to sniff user interactions", "private": true, diff --git a/example/news-interactions/vite.config.ts b/example/news-interactions/vite.config.ts index f0709faf4..b8f68179d 100644 --- a/example/news-interactions/vite.config.ts +++ b/example/news-interactions/vite.config.ts @@ -4,7 +4,7 @@ import tsconfigPaths from "vite-tsconfig-paths"; export default defineConfig({ server: { - port: 3013, + port: 3011, }, plugins: [remix(), tsconfigPaths()], }); diff --git a/iac/ExampleWebApp.ts b/iac/ExampleWebApp.ts index ccde6bfce..472bb36f5 100644 --- a/iac/ExampleWebApp.ts +++ b/iac/ExampleWebApp.ts @@ -37,45 +37,23 @@ export function ExampleAppStack({ stack }: StackContext) { }, }); - // Declare the next js site on news-paper.xyz - // Use it for the ETH-CC demo - const newsInteractionDemo = new NextjsSite(stack, "newsInteractionDemo", { + // Declare the remix site on news-paper.xyz + const newsInteractionDemo = new RemixSite(stack, "newsInteractionDemo", { path: "example/news-interactions", - // Bind to the configs - bind: [frakWalletUrl, backendUrl], - openNextVersion: openNextVersion, // Set the custom domain customDomain: { domainName: "news-paper.xyz", hostedZone: "news-paper.xyz", }, - // Enable image optimization - imageOptimization: { - memorySize: 512, - staticImageOptimization: true, + // Environment variables + environment: { + FRAK_WALLET_URL: frakWalletUrl.value, + BACKEND_URL: backendUrl.value, }, }); - const newsInteractionDemoRemix = new RemixSite( - stack, - "newsInteractionDemoRemix", - { - path: "example/news-interactions-remix", - // Set the custom domain - customDomain: { - domainName: "news-paper-remix.frak.id", - hostedZone: "frak.id", - }, - environment: { - FRAK_WALLET_URL: frakWalletUrl.value, - BACKEND_URL: backendUrl.value, - }, - } - ); - stack.addOutputs({ NewsSiteUrl: ethCCDemo.url, NewsInteractionSiteUrl: newsInteractionDemo.url, - NewsInteractionRemixSiteUrl: newsInteractionDemoRemix.url, }); }