Skip to content

Commit

Permalink
docs: add high-level example. #53 (#54)
Browse files Browse the repository at this point in the history
Co-authored-by: Miroslav Bajtoš <oss@bajtos.net>
  • Loading branch information
juliangruber and bajtos authored Feb 23, 2023
1 parent 94e2407 commit d5c61eb
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,33 @@ computers.
</a>
</div>

## Installation

See [CLI Installation](./cli/README.md#installation).

## Basic use

```js
while (true) {
const start = new Date();
const res = await fetch(
"https://ipfs.io/ipfs/bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi/",
);
console.log(`TTFB: ${new Date() - start}ms`);
await new Promise((resolve) => setTimeout(resolve, 1000));
}
```

```bash
$ zinnia run example.js
TTFB: 235ms
...
```

## API

See [Building Modules](./docs/building-modules.md).

## Architecture

![](./docs/images/runtime-diagram.png)
Expand All @@ -37,10 +64,6 @@ computers.
- **IPFS:** _TBD_
- **Block (K/V) storage:** _TBD_

## Basic use

See [CLI](./cli/README.md).

## Contributing

The
Expand Down

0 comments on commit d5c61eb

Please sign in to comment.