StoryBooker Core
Core is the heart of StoryBooker. It provides the routing and rendering logic for StoryBooker, and is framework agnostic.
It also provides
- a set of utilities for building custom adapters and integrations.
- simple adapters for using local filesystem for storage and database (for testing and development purposes).
Install
npm i @storybooker/core
API
createHonoRouter
Callback to create a Hono router that can be used as a request handler.
The Hono router can be deployed to any platform that supports Hono framework.
createPurgeHandler
Callback to create a purge-handler based on provided options.
Purging deletes all builds older than certain days based on Project's configuration.
Note: The latest build on project's default branch is not deleted.
Adapters (for testing)
LocalFileDatabase
A simple database adapter that uses local file to store data. Defaults to ./db.json file.
LocalFileStorage
A simple storage adapter that uses local folder to store files. Defaults to current folder.