#Is it possible to change the db object on the fly?
3 messages · Page 1 of 1 (latest)
Help is on the way! To mark it as solved, use the /solve command. In the meantime, here are some existing threads that may help you:
Documentation:
This seems to do the job:
// Delete cache of payload object
;(global as any)._payload.payload = null
;(global as any)._payload.promise = null
// Trigger Hot-Module-Replacement of payload config
// by updating the last accessed and last modified time of the file
// (this does not trigger a file change in git)
const time = new Date()
fs.utimesSync('payload.config.ts', time, time)