Skip to content

Commit

Permalink
🔧 Update ExampleAppStack to deploy Remix version
Browse files Browse the repository at this point in the history
  • Loading branch information
srod committed Oct 25, 2024
1 parent 2c66a18 commit 1637b86
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cdk.context.json
**/out/

# production
/build
build

# misc
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion example/news-interactions/package.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion example/news-interactions/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig({
server: {
port: 3013,
port: 3011,
},
plugins: [remix(), tsconfigPaths()],
});
34 changes: 6 additions & 28 deletions iac/ExampleWebApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
}

0 comments on commit 1637b86

Please sign in to comment.