Skip to content

Commit

Permalink
Rename frontend personalization component
Browse files Browse the repository at this point in the history
Signed-off-by: Kate Goldenring <[email protected]>
  • Loading branch information
kate-goldenring committed Nov 7, 2024
1 parent f75be7a commit afea732
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
File renamed without changes.

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

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "personalization-rust"
name = "frontend-personalization"
authors = ["karthik2804 <[email protected]>"]
description = ""
version = "0.1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fn get_data_map() -> HashMap<String, Data> {
}

#[http_component]
async fn handle_personalization_rust(req: Request) -> Result<impl IntoResponse> {
async fn handle_frontend_personalization(req: Request) -> Result<impl IntoResponse> {
let resp: Response = spin_sdk::http::send(Request::get("/_index.html")).await?;
// read response to string
let mut html = String::new();
Expand Down
10 changes: 5 additions & 5 deletions spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ environment = { DESTINATION = "/index.html", STATUSCODE = "301" }

[[trigger.http]]
route = "/index.html"
component = "personalization-rust"
component = "frontend-personalization"

[component.personalization-rust]
source = "personalization-rust/target/wasm32-wasi/release/personalization_rust.wasm"
[component.frontend-personalization]
source = "frontend-personalization/target/wasm32-wasi/release/frontend_personalization.wasm"
allowed_outbound_hosts = ["*://self:*"]
[component.personalization-rust.build]
[component.frontend-personalization.build]
command = "cargo build --target wasm32-wasi --release"
workdir = "personalization-rust"
workdir = "frontend-personalization"
watch = ["src/**/*.rs", "Cargo.toml"]

0 comments on commit afea732

Please sign in to comment.