Store data in a local folder

The simplest store, included in the box. Your data is just files on disk, perfect for solo work on your own machine.

Understudy needs a store: somewhere to keep its data. The simplest one is included, and it writes to a folder on disk. Each record becomes a file, so you can open, back up, or commit your data like any other files.

Set it up

Import the folder store and point it at a directory. That is the whole setup.

import { createUnderstudy } from '@xtrable-ltd/understudy/host';
import { FsStore } from '@xtrable-ltd/understudy/adapter-fs';

const understudy = createUnderstudy({
  store: new FsStore('./understudy-data'),
});

When to use it

  • Solo development on your own machine.
  • You want your data as plain files you can inspect, back up, or commit.
  • You do not need several people sharing one simulation.

When you are ready to share a simulation across a team or an environment, swap the folder store for a cloud one. Nothing else in your host file changes.