Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: karthik2804 <[email protected]>
  • Loading branch information
karthik2804 committed Jan 28, 2025
1 parent 2f223d2 commit 045f9b3
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion examples/aws/s3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This example showcases how to connect to and send messages using Amazon S3 with
const client = new S3Client({
region: "us-west-2",
credentials: {
accessKeyId: "<>>",
accessKeyId: "<>",
secretAccessKey: "<>",
sessionToken: "<>"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/aws/s3/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ module.exports = {
optimization: {
minimize: false
},
};
};
2 changes: 1 addition & 1 deletion examples/aws/sqs/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ module.exports = {
optimization: {
minimize: false
},
};
};
2 changes: 1 addition & 1 deletion examples/blob-storage/backblaze/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ module.exports = {
optimization: {
minimize: false
},
};
};
2 changes: 1 addition & 1 deletion examples/common-patterns/outbound-http/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ module.exports = {
optimization: {
minimize: false
},
};
};
2 changes: 1 addition & 1 deletion examples/common-patterns/routing-requests/spin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ source = "dist/routing-requests.wasm"
exclude_files = ["**/node_modules"]
[component.routing-requests.build]
command = ["npm install", "npm run build"]
watch = ["src/**/*.ts"]
watch = ["src/**/*.ts"]
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ module.exports = {
optimization: {
minimize: false
},
};
};
2 changes: 1 addition & 1 deletion examples/github/octokit-rest/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ module.exports = {
optimization: {
minimize: false
},
};
};
2 changes: 1 addition & 1 deletion examples/orm/drizzle/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ module.exports = {
optimization: {
minimize: false
},
};
};
2 changes: 1 addition & 1 deletion examples/serverless_db/neondb/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ module.exports = {
optimization: {
minimize: false
},
};
};
2 changes: 1 addition & 1 deletion examples/serverless_db/planetscale/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ module.exports = {
optimization: {
minimize: false
},
};
};
2 changes: 1 addition & 1 deletion examples/spin-host-apis/spin-kv/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ router
.get("*", async (req: Request) => {
let store = Kv.openDefault();
let status = 200;
let body;
let body = "Not Found";

switch (req.method) {
case 'POST':
Expand Down
2 changes: 1 addition & 1 deletion examples/spin-host-apis/spin-kv/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ module.exports = {
optimization: {
minimize: false
},
};
};
2 changes: 1 addition & 1 deletion examples/spin-host-apis/spin-llm/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ module.exports = {
optimization: {
minimize: false
},
};
};
2 changes: 1 addition & 1 deletion examples/spin-host-apis/spin-mqtt/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ module.exports = {
optimization: {
minimize: false
},
};
};
2 changes: 1 addition & 1 deletion examples/upstash/qstash/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ router
delay: 2,
});

return new Response(JSON.stringify(resp), { status: 200 });
return new Response(JSON.stringify(resp, null, 2), { status: 200, headers: { "Content-Type": "application/json" } });
})

//@ts-ignore
Expand Down
2 changes: 1 addition & 1 deletion examples/upstash/vector/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ router
topK: 3,
includeMetadata: true,
});
return new Response(JSON.stringify(data, null, 2), { status: 200 });
return new Response(JSON.stringify(data, null, 2), { status: 200, headers: { "Content-Type": "application/json" } });
} catch (e: any) {
return new Response(`error: ${e}`, { status: 500 });
}
Expand Down
3 changes: 1 addition & 2 deletions templates/http-js/content/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://itty.dev/itty-router/routers/autorouter
// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
import { AutoRouter } from 'itty-router';

let router = AutoRouter();
Expand All @@ -10,7 +10,6 @@ router
.get("/", () => new Response("hello universe"))
.get('/hello/:name', ({ name }) => `Hello, ${name}!`)

//@ts-ignore
addEventListener('fetch', async (event) => {
event.respondWith(router.fetch(event.request));
});
2 changes: 1 addition & 1 deletion templates/http-ts/content/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// https://itty.dev/itty-router/routers/autorouter
// For AutoRouter documentation refer to https://itty.dev/itty-router/routers/autorouter
import { AutoRouter } from 'itty-router';

let router = AutoRouter();
Expand Down

0 comments on commit 045f9b3

Please sign in to comment.