updated references

This commit is contained in:
dswbx
2025-07-07 08:39:21 +02:00
parent 786d1d1bd4
commit 7a046fa18e
22 changed files with 115 additions and 89 deletions
+10 -6
View File
@@ -3,9 +3,6 @@ import type { ReactRouterBkndConfig } from "bknd/adapter/react-router";
import { boolean, em, entity, text } from "bknd/data";
import { secureRandomString } from "bknd/utils";
// since we're running in node, we can register the local media adapter
const local = registerLocalMediaAdapter();
const schema = em({
todos: entity("todos", {
title: text(),
@@ -40,11 +37,18 @@ export default {
// ... and media
media: {
enabled: true,
adapter: local({
path: "./public/uploads",
}),
adapter: {
type: "local",
config: {
path: "./public/uploads",
},
},
},
},
beforeBuild: (app) => {
// since we're running in node, we can register the local media adapter
registerLocalMediaAdapter(app);
},
options: {
// the seed option is only executed if the database was empty
seed: async (ctx) => {