mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 12:56:05 +00:00
dev: only report env once
This commit is contained in:
@@ -29,11 +29,10 @@ if (example) {
|
|||||||
|
|
||||||
let app: App;
|
let app: App;
|
||||||
const recreate = import.meta.env.VITE_APP_DISABLE_FRESH !== "1";
|
const recreate = import.meta.env.VITE_APP_DISABLE_FRESH !== "1";
|
||||||
let routesShown = false;
|
let firstStart = true;
|
||||||
export default {
|
export default {
|
||||||
async fetch(request: Request) {
|
async fetch(request: Request) {
|
||||||
if (!app || recreate) {
|
if (!app || recreate) {
|
||||||
console.log("[DB]", credentials);
|
|
||||||
app = App.create({
|
app = App.create({
|
||||||
connection: credentials,
|
connection: credentials,
|
||||||
initialConfig
|
initialConfig
|
||||||
@@ -49,8 +48,9 @@ export default {
|
|||||||
await app.build();
|
await app.build();
|
||||||
|
|
||||||
// log routes
|
// log routes
|
||||||
if (!routesShown) {
|
if (firstStart) {
|
||||||
routesShown = true;
|
console.log("[DB]", credentials);
|
||||||
|
firstStart = false;
|
||||||
console.log("\n\n[APP ROUTES]");
|
console.log("\n\n[APP ROUTES]");
|
||||||
showRoutes(app.server);
|
showRoutes(app.server);
|
||||||
console.log("-------\n\n");
|
console.log("-------\n\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user