app.post( '/searching',
csrf(),
async (c) => {
const { keys } = await c.env[KVq].list()
const allKV = await Promise.all(
//loop though results in KV storage to see if they match user input
keys.map( async ({ name }, index)=>{ // `name` is key
const valueStr = await c.env[KVq].get(name)
//... see if matches, add to accumulator, then return accumulator
app.post( '/searching',
csrf(),
async (c) => {
const { keys } = await c.env[KVq].list()
const allKV = await Promise.all(
//loop though results in KV storage to see if they match user input
keys.map( async ({ name }, index)=>{ // `name` is key
const valueStr = await c.env[KVq].get(name)
//... see if matches, add to accumulator, then return accumulator