Scenario: I have a Remix app deployed using Node.js and I've turned the server.js runner (that imports the Remix build module) into a CLI app (with a serve command that runs the server).
I'd like to add admin commands such as create-account or clear-sessions to the server.js runner that I can run in production. To do that I want to call specific functions defined in my app/db.server.ts file. Thus, I'd like to have those specific functions be included and exported in the build module so I can access them in my production environment. Does anyone know of a way to do that?
Alternatively, would someone recommend another approach to implementing one-off (privileged) admin actions for production?