Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add high-level example. #53 #54

Merged
merged 10 commits into from
Feb 23, 2023
29 changes: 25 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,31 @@ 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));
}
juliangruber marked this conversation as resolved.
Show resolved Hide resolved
```

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

juliangruber marked this conversation as resolved.
Show resolved Hide resolved
## API

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

## Architecture

![](./docs/images/runtime-diagram.png)
Expand All @@ -36,7 +61,3 @@ computers.
- **Networking**: _TBD_
- **IPFS:** _TBD_
- **Block (K/V) storage:** _TBD_

## Basic use

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