1
2
3
4
5
6
7
8
9
import { email } from "https://esm.town/v/std/email?v=9";
import { set } from "https://esm.town/v/std/set?v=11";
import { commentsDB } from "https://esm.town/v/vez/commentsDB";
export async function addComment(str) {
commentsDB.push(str);
await set("commentsDB", commentsDB);
await email({ text: "New Comment Alert!: " + str });
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
v4
October 23, 2023