Skip to content

Commit

Permalink
add the ability to load static assets into the canister on deploy! Al…
Browse files Browse the repository at this point in the history
…so allow a build script to be hooked up by the user
  • Loading branch information
lastmjs committed Jan 27, 2024
1 parent f1c56ca commit 041714c
Show file tree
Hide file tree
Showing 18 changed files with 1,155 additions and 36 deletions.
22 changes: 21 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/express/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.azle
.dfx
node_modules
src/frontend/dist
4 changes: 3 additions & 1 deletion examples/express/dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"candid": "src/backend/index.did",
"build": "npx azle express",
"wasm": ".azle/express/express.wasm",
"gzip": true
"gzip": true,
"assets": ["src/frontend/dist"],
"build_assets": "npm run build"
}
}
}
9 changes: 9 additions & 0 deletions examples/express/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/// <reference types="vite/client" />

interface ImportMetaEnv {
readonly VITE_CANISTER_ID: string;
}

interface ImportMeta {
readonly env: ImportMetaEnv;
}
Loading

0 comments on commit 041714c

Please sign in to comment.