From 955ebc38b59b4695c9edf4416c4de79b59817e60 Mon Sep 17 00:00:00 2001 From: Tyler Hall Date: Fri, 1 Dec 2023 15:27:32 +0000 Subject: [PATCH] docs(nano): update README --- images/nano/Makefile | 8 ++++---- images/nano/README.md | 20 ++++++++------------ 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/images/nano/Makefile b/images/nano/Makefile index bbfc5564..18472021 100644 --- a/images/nano/Makefile +++ b/images/nano/Makefile @@ -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 diff --git a/images/nano/README.md b/images/nano/README.md index b4bb0d23..3ab251e5 100644 --- a/images/nano/README.md +++ b/images/nano/README.md @@ -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)) @@ -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`: @@ -101,7 +101,7 @@ 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): @@ -109,7 +109,7 @@ Consume with [`hyper-connect`](https://github.com/hyper63/hyper/tree/main/packag ```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() ``` @@ -117,7 +117,7 @@ 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 @@ -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