Skip to content

Commit

Permalink
Move assets to legacy_assets and wait to see what will change
Browse files Browse the repository at this point in the history
  • Loading branch information
a1ecbr0wn committed Aug 6, 2024
1 parent 52058b9 commit 3aa8498
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
WRANGLER_LOG="debug"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ wasm-pack.log
# node
/node_modules
package-lock.json

/.wrangler

This file was deleted.

Binary file not shown.
9 changes: 9 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ pub async fn main(req: Request, env: Env, _ctx: worker::Context) -> Result<Respo
|msg, status| Response::error(msg, status),
)
})
.get_async("/favicon.ico", |req, ctx| {
env.bucket(binding)
checked(
req,
ctx,
|ip| Response::ok(ip),
|msg, status| Response::error(msg, status),
)
})
.get_async("/json", |req, ctx| {
checked(
req,
Expand Down
7 changes: 1 addition & 6 deletions wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name = "dev-id"
main = "build/worker/shim.mjs"
compatibility_date = "2023-12-01"
rules = [
{ type = "Data", globs = ["./public/favicon.ico"], fallthrough = true }
]
legacy_assets = "public"
kv_namespaces = [
{ binding = "id", id = "444fcce1202948d59b0d2a326933c413", preview_id = "79d9e5086960445abc089e9d753e0fb5" }
]
Expand All @@ -12,9 +10,6 @@ vars = [
]
send_metrics = false

[site]
bucket = "./public"

[build]
command = "cargo install worker-build && worker-build --release"

Expand Down

0 comments on commit 3aa8498

Please sign in to comment.