// in api/src/core/frontier.js// Make sure to place this in app.js AFTER app.configure(configuration)// to get access to all the config varsimportPreloadfrom'@frontierjs/api/preload'importDbfrom'@frontierjs/api/db'importFetchfrom'@frontierjs/api/fetch'importLoggerfrom'@frontierjs/api/logger'import{prismaHooks}from'../core/prisma.hooks'exportdefaultfunction(app){[Preload(),Db({
...app.get('dbConfig'),
prismaHooks
}),Fetch(),Logger({dbLogFile: app.get('dbLogFile')||'.api.db.log'}),].forEach((config)=>app.configure(config))}
// in api/src/core/prisma.hooks.jsimport{castNumbers,removeRelations,removeExtra,stringifyModelFields,parseModelFields,setUpdatedAt}from'@frontierjs/api/prisma-hooks'