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.