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
+9 -6
View File
@@ -3,9 +3,6 @@ import { registerLocalMediaAdapter } from "bknd/adapter/node";
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();
// the em() function makes it easy to create an initial schema
const schema = em({
todos: entity("todos", {
@@ -41,11 +38,17 @@ export default {
// ... and media
media: {
enabled: true,
adapter: local({
path: "./public/uploads",
}),
adapter: {
type: "local",
config: {
path: "./public/uploads",
},
},
},
},
beforeBuild: (app) => {
registerLocalMediaAdapter(app);
},
options: {
// the seed option is only executed if the database was empty
seed: async (ctx) => {