mirror of
https://github.com/pockethost/pockethost.git
synced 2025-07-06 21:02:31 +00:00
17 lines
545 B
TypeScript
17 lines
545 B
TypeScript
// import from 'https://raw.githubusercontent.com/benallfree/pockethost/deno-workers/packages/deno-worker/index.ts'
|
|
import { init } from '../../../deno-worker/index.ts'
|
|
|
|
// @deno-types="https://cdn.jsdelivr.net/npm/pocketbase/dist/pocketbase.es.d.ts"
|
|
import PocketBase from 'https://cdn.jsdelivr.net/npm/pocketbase'
|
|
|
|
const { client, adminAuthWithPassword } = init(PocketBase)
|
|
|
|
try {
|
|
await adminAuthWithPassword()
|
|
setInterval(() => {
|
|
console.log(`ping`)
|
|
}, 1000)
|
|
} catch (e) {
|
|
console.error(`caught an error`, e, JSON.stringify(e))
|
|
}
|