mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
change default mode of cloudflare example to "warm", suppress listener info
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"bin": "./dist/cli/index.js",
|
"bin": "./dist/cli/index.js",
|
||||||
"version": "0.8.0-rc.8",
|
"version": "0.8.0-rc.9",
|
||||||
"description": "Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, Remix, Astro, Cloudflare, Bun, Node, AWS Lambda & more.",
|
"description": "Lightweight Firebase/Supabase alternative built to run anywhere — incl. Next.js, Remix, Astro, Cloudflare, Bun, Node, AWS Lambda & more.",
|
||||||
"homepage": "https://bknd.io",
|
"homepage": "https://bknd.io",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
@@ -128,7 +128,8 @@ export class EventManager<
|
|||||||
if (listener.id) {
|
if (listener.id) {
|
||||||
const existing = this.listeners.find((l) => l.id === listener.id);
|
const existing = this.listeners.find((l) => l.id === listener.id);
|
||||||
if (existing) {
|
if (existing) {
|
||||||
console.warn(`Listener with id "${listener.id}" already exists.`);
|
// @todo: add a verbose option?
|
||||||
|
//console.warn(`Listener with id "${listener.id}" already exists.`);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import { serve } from "bknd/adapter/cloudflare";
|
import { serve } from "bknd/adapter/cloudflare";
|
||||||
|
|
||||||
export default serve({
|
export default serve({
|
||||||
mode: "fresh",
|
mode: "warm",
|
||||||
onBuilt: async (app) => {
|
onBuilt: async (app) => {
|
||||||
app.modules.server.get("/custom", (c) => c.json({ hello: "world" }));
|
app.modules.server.get("/custom", (c) => c.json({ hello: "world" }));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user