From 93d5d62f3f3220dbb436fc95c79fd0163a727921 Mon Sep 17 00:00:00 2001 From: Allen Dema <64094914+allendema@users.noreply.github.com> Date: Sat, 9 Nov 2024 23:16:14 +0100 Subject: [PATCH] docs: sync .env file and format readme --- .env.example_hearchco | 18 +++++++++++------- .env.example_upstream | 8 ++++++++ README.md | 12 ++++++------ 3 files changed, 25 insertions(+), 13 deletions(-) create mode 100644 .env.example_upstream diff --git a/.env.example_hearchco b/.env.example_hearchco index 3a5fe34..9fcddfe 100644 --- a/.env.example_hearchco +++ b/.env.example_hearchco @@ -1,8 +1,12 @@ PUBLIC_UI_VERSION=dev -PUBLIC_URI=http://localhost:5173 -# use local frontend with local backend -API_URI=http://localhost:3030 # server reachable -PUBLIC_API_URI=http://localhost:3030 # client reachable -# use local frontend with official backend (CORS is enabled for http://localhost:5173) -# API_URI=https://api.hearch.co -# PUBLIC_API_URI=https://api.hearch.co + +# hearchco webui +PUBLIC_URI=https://hearchco.pi.local + +API_URI=https://api.hearchco.pi.local +# allow self-signed https certificates (to searxng api) +NODE_TLS_REJECT_UNAUTHORIZED=0 + +# PUBLIC_API_URI is the webui which your devices should reach +# PUBLIC_API_URI must be allowed in cors (http headers) searxNG settings.yml +PUBLIC_API_URI=https://hearchco.pi.local diff --git a/.env.example_upstream b/.env.example_upstream new file mode 100644 index 0000000..21c305c --- /dev/null +++ b/.env.example_upstream @@ -0,0 +1,8 @@ +PUBLIC_UI_VERSION=dev +PUBLIC_URI=http://localhost:5173 +# use local frontend with local backend +API_URI=http://localhost:8080 # server reachable +PUBLIC_API_URI=http://localhost:8080 # client reachable +# use local frontend with official backend (CORS is enabled for http://localhost:5173) +# API_URI=https://api.hearch.co +# PUBLIC_API_URI=https://api.hearch.co diff --git a/README.md b/README.md index b482e19..ca3f245 100644 --- a/README.md +++ b/README.md @@ -15,21 +15,21 @@ make install ## Setup -## Edit `.env` file with your domain. -## Add HTTP Headers for your frontend domain to searxNG settings.yml and restart it. +- Edit `.env` file with your domain. +- Add HTTP Headers for your frontend domain to searxNG settings.yml and restart it. In 'server' -> 'default\_http\_headers' section: ```yaml Access-Control-Allow-Origin: "https://*.pi.local" - Access-Control-Allow-Methods: "GET, POST" + Access-Control-Allow-Methods: "GET" Access-Control-Allow-Headers: "Content-Type, Authorization" ``` -`make dev` +- `make dev` -then visit your domain/webui to search! +- then visit your domain/webui to search! ## TODO - fix image previews - copy search url - systemd service - - use [bunJS](https://bun.sh/) instead of yarn/pnpm. + - use [bun](https://bun.sh/) instead of yarn/pnpm.