add ci (#1)
Some checks failed
ci/woodpecker/push/ci Pipeline failed

Co-authored-by: Madison Grubb <madison@elastiflow.com>
Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
2026-02-12 19:50:44 +00:00
parent b7046dc0e6
commit 28ac43e47b
32 changed files with 2089 additions and 2973 deletions

View File

@@ -1,14 +1,11 @@
import { getDb, closeDb } from '../utils/db.js'
import { migrateFeedsToDevices } from '../utils/migrateFeedsToDevices.js'
/**
* Initialize DB (and run bootstrap if no users) at server startup
* so credentials are printed in the terminal before any request.
* Initialize DB at server startup.
* Close DB on server shutdown to avoid native sqlite3 crashes in worker teardown.
*/
// eslint-disable-next-line no-undef
export default defineNitroPlugin((nitroApp) => {
void getDb().then(() => migrateFeedsToDevices())
void getDb()
nitroApp.hooks.hook('close', () => {
closeDb()
})

View File

@@ -86,7 +86,6 @@ export function broadcastToSession(sessionId, message) {
}
}
// eslint-disable-next-line no-undef
export default defineNitroPlugin((nitroApp) => {
nitroApp.hooks.hook('ready', async () => {
const server = nitroApp.h3App.server || nitroApp.h3App.nodeServer