Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
TillaTheHun0 committed Dec 1, 2023
1 parent 0e6e777 commit 58f5155
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
8 changes: 4 additions & 4 deletions images/nano/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ clean:

compile-linux:
@deno compile --target=x86_64-unknown-linux-gnu \
--allow-sys --allow-env --allow-read --allow-write=__hyper__,/tmp/hyper --allow-net \
--allow-run --allow-sys --allow-env --allow-read --allow-write=__hyper__,/tmp/hyper --allow-net \
--unstable --no-check=remote \
--output ./build/hyper-x86_64-unknown-linux-gnu-$(VER) mod.js

compile-apple:
@deno compile --target=x86_64-apple-darwin \
--allow-sys --allow-env --allow-read --allow-write=__hyper__,/tmp/hyper --allow-net \
--allow-run --allow-sys --allow-env --allow-read --allow-write=__hyper__,/tmp/hyper --allow-net \
--unstable --no-check=remote \
--output ./build/hyper-x86_64-apple-darwin-$(VER) mod.js

compile-arch-apple:
@deno compile --target=aarch64-apple-darwin \
--allow-sys --allow-env --allow-read --allow-write=__hyper__,/tmp/hyper --allow-net \
--allow-run --allow-sys --allow-env --allow-read --allow-write=__hyper__,/tmp/hyper --allow-net \
--unstable --no-check=remote \
--output ./build/hyper-aarch64-apple-darwin-$(VER) mod.js

compile-windows:
@deno compile --target=x86_64-pc-windows-msvc \
--allow-sys --allow-env --allow-read --allow-write=__hyper__,/tmp/hyper --allow-net \
--allow-run --allow-sys --allow-env --allow-read --allow-write=__hyper__,/tmp/hyper --allow-net \
--unstable --no-check=remote \
--output ./build/hyper-x86_64-pc-windows-msvc-$(VER) mod.js
20 changes: 8 additions & 12 deletions images/nano/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ logic. `hyper-nano` is an embodiment of this approach.
[`adapters`](https://docs.hyper.io/oss/building-your-own-adapter) for all of the hyper service
offerings:

- data (powered by [PouchDB](https://github.com/hyper63/hyper-adapter-pouchdb))
- data (powered by [In-Memory MongoDB](https://github.com/hyper63/hyper-adapter-mongodb))
- cache (powered by [Sqlite](https://github.com/hyper63/hyper-adapter-sqlite))
- storage (powered by your local [file system](https://github.com/hyper63/hyper-adapter-fs))
- search (powered by [Sqlite and Minisearch](https://github.com/hyper63/hyper-adapter-minisearch))
Expand Down Expand Up @@ -78,7 +78,7 @@ npx hyper-nano --domain=foobar --experimental --data --cache ...
Alternatively, if you use `Deno` you may run `hyper nano` directly from the source:

```sh
deno run --allow-env --allow-read --allow-write=__hyper__ --allow-net --unstable --no-check=remote https://raw.githubusercontent.com/hyper63/hyper/main/images/nano/mod.js
deno run --allow-run --allow-env --allow-read --allow-write=__hyper__ --allow-net --unstable --no-check=remote https://raw.githubusercontent.com/hyper63/hyper/main/images/nano/mod.js
```

If you'd like to programmatically start `hyper nano`, you can import `main.js` and run `main`:
Expand All @@ -101,23 +101,23 @@ then consume your hyper instance
using `HTTP`.

To consume using [`hyper-connect`](https://github.com/hyper63/hyper/tree/main/packages/connect) pass
`http://localhost:[port]/[domain]` to `hyper-connect` as your
`http://127.0.0.1:[port]/[domain]` to `hyper-connect` as your
[`connection string`](https://docs.hyper.io/app-keys#nq-connection-string)

Consume with [`hyper-connect`](https://github.com/hyper63/hyper/tree/main/packages/connect):

```js
import { connect } from 'hyper-connect'

const hyper = connect('http://localhost:6363/test')
const hyper = connect('http://127.0.0.1:6363/test')

await hyper.data.list()
```

Or consume via HTTP

```sh
curl http://localhost:6363/data/test
curl http://127.0.0.1:6363/data/test
```

> Starting with Node 17, Node has changed how it resolves `localhost`, when using global `fetch` and
Expand Down Expand Up @@ -205,25 +205,21 @@ await main({
### cache

```
./scripts/cache.sh
deno task cache
```

### test

```
./scripts/test.sh
deno task test
```

### compile

```
./scripts/compile.sh
make clean compile-{target}
```

### actions

Github actions deploy hyper to https://hyperland.s3.amazonaws.com/hyper

## LICENSE

Apache 2.0

0 comments on commit 58f5155

Please sign in to comment.