From 892cbdacd24c6e9ac8aa63a968e0a27f1a128986 Mon Sep 17 00:00:00 2001 From: kasun Date: Fri, 27 Mar 2026 13:21:01 +0100 Subject: [PATCH] added api client setup doc --- docs/02-Preparation/06-Setup-API-client.md | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 docs/02-Preparation/06-Setup-API-client.md diff --git a/docs/02-Preparation/06-Setup-API-client.md b/docs/02-Preparation/06-Setup-API-client.md new file mode 100644 index 0000000..37cd7fc --- /dev/null +++ b/docs/02-Preparation/06-Setup-API-client.md @@ -0,0 +1,57 @@ +**vaessl: Setup API client** + +# Locally hosted API client + +I chose [Hoppscotch ](https://docs.hoppscotch.io/) as API client since it is free, open-source, has a Docker support and can be locally hosted. Together with its browser extension it can be run in the browser supporting my goal of a flexible, browser-based development environment where I can securely access and interact with my entire stack remotely. + +``` +services: + hoppscotch: + image: hoppscotch/hoppscotch + container_name: hoppscotch + restart: unless-stopped + # ATTENTION: Run command and entrypoint for the first time and then comment it out + #command: '-c "pnpx prisma migrate deploy"' + #entrypoint: sh + environment: + PUID: 1000 + PGID: 1000 + # Prisma Config + DATABASE_URL: postgresql://user:pw@192.168.1.208:5432/hoppscotch + # (Optional) By default, the AIO container (when in subpath access mode) exposes the endpoint on port 80. Use this setting to specify a different port if needed. + HOPP_AIO_ALTERNATE_PORT: 80 + # Sensitive Data Encryption Key while storing in Database (32 character) + DATA_ENCRYPTION_KEY: 'key' + # Whitelisted origins for the Hoppscotch App. + # This list controls which origins can interact with the app through cross-origin comms. + # - localhost ports (3170, 3000, 3100): app, backend, development servers and services + # - app://localhost_3200: Bundle server origin identifier + # NOTE: `3200` here refers to the bundle server (port 3200) that provides the bundles, + # NOT where the app runs. The app itself uses the `app://` protocol with dynamic + # bundle names like `app://{bundle-name}/` + WHITELISTED_ORIGINS: http://localhost:3170,http://localhost:3009,http://localhost:3101,app://localhost_3200,app://hoppscotch + # Base URLs + VITE_BASE_URL: http://localhost:3009 + VITE_SHORTCODE_BASE_URL: http://localhost:3009 + VITE_ADMIN_URL: http://localhost:3101 + # Backend URLs + VITE_BACKEND_GQL_URL: http://localhost:3170/graphql + VITE_BACKEND_WS_URL: wss://localhost:3170/graphql + VITE_BACKEND_API_URL: http://localhost:3170/v1 + # Terms Of Service And Privacy Policy Links (Optional) + VITE_APP_TOS_LINK: https://docs.hoppscotch.io/support/terms + VITE_APP_PRIVACY_POLICY_LINK: https://docs.hoppscotch.io/support/privacy + # Set to `true` for subpath based access + ENABLE_SUBPATH_BASED_ACCESS: false + ports: + - '3170:3170' + - '3101:3100' + - '3009:3000' + networks: + - postgres_pg_network + +networks: + postgres_pg_network: + external: true + +``` \ No newline at end of file