DEFAULT_FUNCTION_NAME = 'foo'
DEFAULT_SCRIPT = """export default async (req) => {
console.log(`Method:${req.method}`)
console.log(`Generating ${environment.lines} random lines...`)
let svgContent = "";
for (let i = 0; i < environment.lines; i++) {
console.log(i)
let pathD = "M2 " + Math.random() * 79;
let circles = "";
for (let x = 12; x <= 202; x += 10) {
let y = Math.random() * 79
pathD += ` L${x} ${y}`;
circles += ``;
}
let pathColor = `rgb(${Math.random() * 255}, ${Math.random() * 255}, ${Math.random() * 255})`;
svgContent += `
${circles}
`;
}
return HtmlResponse(``);
}"""
DEFAULT_ENVIRONMENT = """{
"lines": 3
}"""