Package Exports
- local-spicedb
- local-spicedb/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (local-spicedb) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Local SpiceDB
Warning This project is still experimental, not for production use - FEATURES MAY CHANGE WITHOUT WARNING
Local SpiceDB instance for testing
Features
- Interacts with
spicedbin your local$PATH - provides start and start server functionality
- users in-memory to easily throw-away for integration testing
Install
brew bundle # installs spicedb locally
npm install -D local-spicedbUsage
import { describe, it } from 'vitest'
import { SpiceDBServer } from 'local-spicedb'
describe('My SpiceDB Application', () => {
it('can start and stop server', async () => {
const server = SpiceDBServer({ 'grpc-preshared-key': 'test' })
await server.start()
// ...
// 1. make requests to spicedb server, default port using pre-shared key above
// 2....
// 3. great profit
// ...
await server.stop() # sends SIGINT to running process
})
})