import { makeContext as makeBasicContext } from '@owlmeans/server-app' import { appendStaticResource } from '@owlmeans/static-resource' import { SESSION_ITEMS } from './consts.js' import type { Config, Context } from './types.js' export const makeContext = >(cfg: C): T => { const context = makeBasicContext(cfg, true) // Register an in-memory resource for session items. No database required — // data lives in process memory and is cleared when the api restarts. appendStaticResource(context, SESSION_ITEMS) return context }