Michael Francis
Michael Francis
DDeno
Created by Michael Francis on 10/4/2024 in #help
VSCode JavaScript Debug Terminal
In some projects we have lots of cli scripts we run. Setting up vscode tasks for each one is a bit annoying. Is there anyway to take advantage of the JavaScript Debug Terminal in VS Code?
1 replies
DDeno
Created by Michael Francis on 5/1/2024 in #help
KV watch prefix?
Is there a way to watch a prefix. I would like to be able to watch for any record added to a specific key prefix.
export async function logData(jsonObject: Object) {
const timestamp = Date.now();
const id = nanoid();
try {
console.log("set", timestamp, id);
await kv.set(["dev-logs", timestamp, id], jsonObject);
console.log("done set");
} catch (error) {
console.error(error);
}
}
export async function logData(jsonObject: Object) {
const timestamp = Date.now();
const id = nanoid();
try {
console.log("set", timestamp, id);
await kv.set(["dev-logs", timestamp, id], jsonObject);
console.log("done set");
} catch (error) {
console.error(error);
}
}
I want to be able to
const newLogs = kv.watch([["dev-logs]])
const newLogs = kv.watch([["dev-logs]])
And now I have an iterator that I can watch any new logs added.
1 replies