Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
break
default:
throw new Error(
`Incorrect process.env.ADAPTER = ${process.env.ADAPTER}`
)
}
const storage = createStorage({
pathToFile: path.join(__dirname, 'event-storage.db')
})
const eventStore = createEventStore({ storage })
const connectorName = 'default-adapter'
const readModelName = 'default-read-model'
const query = createQuery({
eventStore,
viewModels: [],
readModelConnectors: {
[connectorName]: adapter
},
readModels: [
{
name: readModelName,
connectorName,
projection,
resolvers
}
]
})
await query.read({