{"id":13785970,"url":"https://github.com/resgateio/resgate","last_synced_at":"2026-04-02T03:19:26.749Z","repository":{"id":41153202,"uuid":"122473313","full_name":"resgateio/resgate","owner":"resgateio","description":"A Realtime API Gateway used with NATS to build REST, real time, and RPC APIs, where all your clients are synchronized seamlessly.","archived":false,"fork":false,"pushed_at":"2024-07-12T14:21:17.000Z","size":2491,"stargazers_count":738,"open_issues_count":15,"forks_count":70,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-12-18T04:21:52.319Z","etag":null,"topics":["api-gateway","go","golang","microservices","microservices-architecture","nats-server","realtime","resgate","rest-api"],"latest_commit_sha":null,"homepage":"https://resgate.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/resgateio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["jirenius"],"custom":["https://www.paypal.me/jirenius"]}},"created_at":"2018-02-22T12:06:26.000Z","updated_at":"2025-11-25T18:37:22.000Z","dependencies_parsed_at":"2024-01-17T03:17:31.763Z","dependency_job_id":"8ec47920-28be-4d4a-b15b-b58be2388687","html_url":"https://github.com/resgateio/resgate","commit_stats":{"total_commits":332,"total_committers":3,"mean_commits":"110.66666666666667","dds":0.06927710843373491,"last_synced_commit":"76fddf355b4d0918f894d06301ed5d7746e50742"},"previous_names":["jirenius/resgate"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/resgateio/resgate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resgateio%2Fresgate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resgateio%2Fresgate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resgateio%2Fresgate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resgateio%2Fresgate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/resgateio","download_url":"https://codeload.github.com/resgateio/resgate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resgateio%2Fresgate/sbom","scorecard":{"id":521540,"data":{"date":"2025-08-11","repo":{"name":"github.com/resgateio/resgate","commit":"0cab702e09ff52306e59a3615d93eb29671a7f15"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/17 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/docker.yml:14","Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/docker.yml:1","Warn: topLevel 'contents' permission set to 'write': .github/workflows/release.yml:10","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/docker.yml:9"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docker.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/docker.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/docker.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docker.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/docker.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docker.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/docker.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/resgateio/resgate/release.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating golang to golang@sha256:9e56f0d0f043a68bb8c47c819e47dc29f6e8f5129b8885bed9d43f058f7f3ed6","Warn: containerImage not pinned by hash: docker/Dockerfile:1","Warn: containerImage not pinned by hash: docker/Dockerfile.alpine:1","Warn: containerImage not pinned by hash: docker/Dockerfile.alpine:18: pin your Docker image by updating alpine:3.20 to alpine:3.20@sha256:b3119ef930faabb6b7b976780c0c7a9c1aa24d0c75e9179ac10e6bc9ac080d0d","Warn: goCommand not pinned by hash: scripts/install-checks.sh:3","Warn: goCommand not pinned by hash: scripts/install-checks.sh:4","Warn: goCommand not pinned by hash: .github/workflows/build.yml:48","Warn: goCommand not pinned by hash: .github/workflows/build.yml:63","Warn: goCommand not pinned by hash: .github/workflows/build.yml:64","Info:   0 out of  13 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned","Info:   4 out of   9 goCommand dependencies pinned","Info:   0 out of   4 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.8.0 not signed: https://api.github.com/repos/resgateio/resgate/releases/163836110","Warn: release artifact v1.7.5 not signed: https://api.github.com/repos/resgateio/resgate/releases/56526709","Warn: release artifact v1.7.4 not signed: https://api.github.com/repos/resgateio/resgate/releases/53241705","Warn: release artifact v1.7.3 not signed: https://api.github.com/repos/resgateio/resgate/releases/51954290","Warn: release artifact v1.7.2 not signed: https://api.github.com/repos/resgateio/resgate/releases/51208400","Warn: release artifact v1.8.0 does not have provenance: https://api.github.com/repos/resgateio/resgate/releases/163836110","Warn: release artifact v1.7.5 does not have provenance: https://api.github.com/repos/resgateio/resgate/releases/56526709","Warn: release artifact v1.7.4 does not have provenance: https://api.github.com/repos/resgateio/resgate/releases/53241705","Warn: release artifact v1.7.3 does not have provenance: https://api.github.com/repos/resgateio/resgate/releases/51954290","Warn: release artifact v1.7.2 does not have provenance: https://api.github.com/repos/resgateio/resgate/releases/51208400"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 17 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0307 / GHSA-g6w6-r76c-28j7","Warn: Project is vulnerable to: GO-2022-0351 / GHSA-6h3m-36w8-hv68","Warn: Project is vulnerable to: GO-2023-2066","Warn: Project is vulnerable to: GO-2024-2980 / GHSA-2h2x-8hh2-mfq8","Warn: Project is vulnerable to: GO-2023-2133 / GHSA-fr2g-9hjm-wr23","Warn: Project is vulnerable to: GO-2025-3600 / GHSA-fhg8-qxh5-7q3w","Warn: Project is vulnerable to: GO-2022-0968 / GHSA-gwc9-m7rh-j2ww","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T03:08:40.330Z","repository_id":41153202,"created_at":"2025-08-20T03:08:40.330Z","updated_at":"2025-08-20T03:08:40.330Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31295052,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:43:37.129Z","status":"online","status_checked_at":"2026-04-02T02:00:08.535Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-gateway","go","golang","microservices","microservices-architecture","nats-server","realtime","resgate","rest-api"],"created_at":"2024-08-03T19:01:07.452Z","updated_at":"2026-04-02T03:19:26.688Z","avatar_url":"https://github.com/resgateio.png","language":"Go","funding_links":["https://github.com/sponsors/jirenius","https://www.paypal.me/jirenius","https://paypal.me/jirenius"],"categories":["Distributed Systems"],"sub_categories":["Advanced Console UIs"],"readme":"\u003cp align=\"center\"\u003e\u003ca href=\"https://resgate.io\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg width=\"100\" src=\"docs/img/resgate-logo.png\" alt=\"Resgate logo\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n\n\u003ch2 align=\"center\"\u003e\u003cb\u003eRealtime API Gateway\u003c/b\u003e\u003cbr/\u003eSynchronize Your Clients\u003c/h2\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\" alt=\"license\"\u003e\u003c/a\u003e\n\u003ca href=\"https://goreportcard.com/report/resgateio/resgate\"\u003e\u003cimg src=\"http://goreportcard.com/badge/github.com/resgateio/resgate\" alt=\"Report Card\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/resgateio/resgate/actions/workflows/build.yml?query=branch%3Amaster\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/resgateio/resgate/build.yml?branch=master\" alt=\"Build Status\"\u003e\u003c/a\u003e\n\u003ca href=\"https://coveralls.io/github/resgateio/resgate?branch=master\"\u003e\u003cimg src=\"https://coveralls.io/repos/github/resgateio/resgate/badge.svg?branch=master\" alt=\"Coverage\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003eVisit \u003ca href=\"https://resgate.io\"\u003eResgate.io\u003c/a\u003e for \u003ca href=\"https://resgate.io/docs/get-started/introduction/\"\u003eguides\u003c/a\u003e, \u003ca href=\"https://resgate.io/demo/\"\u003elive demos\u003c/a\u003e, and \u003ca href=\"https://resgate.io/docs/get-started/resources/\"\u003eresources\u003c/a\u003e.\u003c/p\u003e\n\n---\n\nResgate is a [Go](http://golang.org) project implementing a realtime API gateway for the [RES protocol](docs/res-protocol.md) with [NATS server](https://nats.io/about/) as messaging system.\n\nIt is a simple server that lets you create REST, real time, and RPC APIs, where all your clients are synchronized seamlessly.\n\nUsed for building **new REST APIs** with real-time functionality, or when creating **single page applications** using reactive frameworks such as React, Vue.js, or Modapp.\n\n![Book Collection Animation](docs/img/book-collection-anim.gif)  \n*Screen capture from the [Book Collection Example](examples/book-collection/). Try out the [Live demo](https://resgate.io/demo/#book-collection-demo) version yourself.*\n\n## How it works\n\nResgate handles all API requests from your clients, instead of directly exposing your micro-services (represented by *Node.js* and *Java* below). Clients will connect to Resgate, using either HTTP or WebSocket, to make requests. These requests are sent to the micro-services over NATS server, and Resgate will keep track on which resource each client has requested.\n\nWhenever there is a change to the data, the responsible micro-service sends an event. Resgate will use this event to both update its own cache, and make sure each subscribing client is kept up-to-date.\n\n\u003cp align=\"center\"\u003e\u003cimg width=\"480\" src=\"docs/img/res-network.png\" alt=\"RES network diagram\"\u003e\u003c/p\u003e\n\n## Quickstart\n\nIf you \u003ca href=\"https://docs.docker.com/install/\" target=\"_blank\"\u003einstall Docker\u003c/a\u003e, it is easy to run both *NATS server* and *Resgate* as containers:\n\n```text\ndocker network create res\ndocker run -d --name nats -p 4222:4222 --net res nats\ndocker run --name resgate -p 8080:8080 --net res resgateio/resgate --nats nats://nats:4222\n```\n\nBoth images are small, about 10 MB each.\n\nSee [Resgate.io - Installation](https://resgate.io/docs/get-started/installation/) for other ways of installation.\n\n## Examples\n\nWhile Resgate may be used with any language, the examples in this repository are written in Javascript for Node.js, without using any additional library.\n\n* For Go (golang) examples, see [go-res package](https://github.com/jirenius/go-res)\n* For C# (NETCore) examples, see [RES Service for .NET](https://github.com/jirenius/csharp-res)\n\n| Example | Description\n| --- | ---\n| [Hello World](examples/hello-world/) | Simple service serving a static message.\n| [Edit Text](examples/edit-text/) | Text field that can be edited by multiple clients concurrently.\n| [Book Collection](examples/book-collection/) | List of book titles \u0026 authors that can be edited by many.\n| [JWT Authentication](examples/jwt-authentication/) |Showing how JWT tokens can be used for authentication.\n| [Password Authentication](examples/password-authentication/) | Showing authentication with user and password credentials.\n| [Client Session](examples/client-session/) | Creating client sessions that survive reloads and reconnects.\n\n\u003e **Note**\n\u003e\n\u003e All examples are complete with both service and client.\n\n## Protocol Specification\n\nFor more in depth information on the protocol:\n\n* [RES protocol](docs/res-protocol.md) - Introduction and general terminology\n* [RES-Service protocol](docs/res-service-protocol.md) - How to write services\n* [RES-Client protocol](docs/res-client-protocol.md) - How to write client libraries, if [ResClient](https://github.com/resgateio/resclient) doesn't fit your needs\n\n## Usage\n```\nresgate [options]\n```\n\n### Server options\n\n| Option | Description | Default value\n| --- | --- | ---\n| \u003ccode\u003e-n, --nats \u0026lt;url\u0026gt;\u003c/code\u003e | NATS Server URL | `nats://127.0.0.1:4222`\n| \u003ccode\u003e-i, --addr \u0026lt;host\u0026gt;\u003c/code\u003e | Bind to HOST address | `0.0.0.0`\n| \u003ccode\u003e-p, --port \u0026lt;port\u0026gt;\u003c/code\u003e | HTTP port for client connections | `8080`\n| \u003ccode\u003e-w, --wspath \u0026lt;path\u0026gt;\u003c/code\u003e | WebSocket path for clients | `/`\n| \u003ccode\u003e-a, --apipath \u0026lt;path\u0026gt;\u003c/code\u003e | Web resource path for clients | `/api/`\n| \u003ccode\u003e-r, --reqtimeout \u0026lt;seconds\u0026gt;\u003c/code\u003e | Timeout duration for NATS requests | `3000`\n| \u003ccode\u003e-u, --headauth \u0026lt;method\u0026gt;\u003c/code\u003e | Resource method for header authentication |\n| \u003ccode\u003e-t, --wsheadauth \u0026lt;method\u0026gt;\u003c/code\u003e | Resource method for WebSocket header authentication |\n| \u003ccode\u003e-m, --metricsport \u0026lt;port\u0026gt;\u003c/code\u003e | HTTP port for OpenMetrics connections | `0` (disabled)\n| \u003ccode\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;--apiencoding \u0026lt;type\u0026gt;\u003c/code\u003e | Encoding for web resources: json, jsonflat | `json`\n| \u003ccode\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;--putmethod \u0026lt;methodName\u0026gt;\u003c/code\u003e | Call method name mapped to HTTP PUT requests |\n| \u003ccode\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;--deletemethod \u0026lt;methodName\u0026gt;\u003c/code\u003e | Call method name mapped to HTTP DELETE requests |\n| \u003ccode\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;--patchmethod \u0026lt;methodName\u0026gt;\u003c/code\u003e | Call method name mapped to HTTP PATCH requests |\n| \u003ccode\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;--wscompression\u003c/code\u003e | Enable WebSocket per message compression |\n| \u003ccode\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;--resetthrottle  \u0026lt;limit\u0026gt;\u003c/code\u003e | Limit on parallel requests sent on a system reset | `0` (no limit)\n| \u003ccode\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;--referencethrottle  \u0026lt;limit\u0026gt;\u003c/code\u003e | Limit on parallel requests sent following references | `0` (no limit)\n| \u003ccode\u003e-c, --config \u0026lt;file\u0026gt;\u003c/code\u003e | Configuration file in JSON format |\n\n### Security options\n\n| Option | Description | Default value\n| --- | --- | ---\n| \u003ccode\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;--tls\u003c/code\u003e | Enable TLS for HTTP | `false`\n| \u003ccode\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;--tlscert \u0026lt;file\u0026gt;\u003c/code\u003e | HTTP server certificate file |\n| \u003ccode\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;--tlskey \u0026lt;file\u0026gt;\u003c/code\u003e | Private key for HTTP server certificate |\n| \u003ccode\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;--creds \u0026lt;file\u0026gt;\u003c/code\u003e | NATS User Credentials file |\n| \u003ccode\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;--natscert \u0026lt;file\u0026gt;\u003c/code\u003e | NATS Client certificate file |\n| \u003ccode\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;--natskey \u0026lt;file\u0026gt;\u003c/code\u003e | NATS Client certificate key file |\n| \u003ccode\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;--natsrootca \u0026lt;file\u0026gt;\u003c/code\u003e | NATS Root CA file(s) |\n| \u003ccode\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;--alloworigin \u0026lt;origin\u0026gt;\u003c/code\u003e | Allowed origin(s): *, or \\\u003cscheme\\\u003e://\\\u003chostname\\\u003e\\[:\\\u003cport\\\u003e\\] | `*`\n\n### Logging options\n\n| Option | Description\n| --- | ---\n| \u003ccode\u003e-D, --debug\u003c/code\u003e | Enable debugging output\n| \u003ccode\u003e-V, --trace\u003c/code\u003e | Enable trace logging\n| \u003ccode\u003e-DV\u003c/code\u003e | Debug and trace\n\n### Common options\n\n| Option | Description\n| --- | ---\n| \u003ccode\u003e-h, --help\u003c/code\u003e | Show usage message\n| \u003ccode\u003e-v, --version\u003c/code\u003e | Show version\n\n\n## Configuration\nConfiguration is a JSON encoded file. If no config file is found at the given path, a new file will be created with default values as follows.\n\n### Properties\n\n```javascript\n{\n    // URL to the NATS server.\n    \"natsUrl\": \"nats://127.0.0.1:4222\",\n\n    // Bind to HOST IPv4 or IPv6 address.\n    // Empty string (\"\") means all IPv4 and IPv6 addresses.\n    // Invalid or missing IP address defaults to 0.0.0.0.\n    \"addr\": \"0.0.0.0\",\n\n    // Port for the http server to listen on.\n    // If the port value is missing or 0, standard http(s) port is used.\n    \"port\": 8080,\n\n    // Metrics port for the OpenMetrics http server to listen on.\n    // If the port value is missing or 0, metrics are disabled.\n    // Must be different from the configured api port.\n    // Metrics are available at the path: /metrics\n    \"metricsPort\": 0,\n\n    // Path for accessing the RES API WebSocket.\n    \"wsPath\": \"/\",\n\n    // Path prefix for accessing web resources.\n    \"apiPath\": \"/api\",\n\n    // Timeout in milliseconds for NATS requests.\n    \"requestTimeout\": 3000,\n\n    // Size of message buffer for incoming NATS requests.\n    \"bufferSize\": 8192,\n\n    // Header authentication resource method for web resources.\n    // Prior to accessing the resource, this resource method will be called,\n    // allowing a service to set a token using information such as the request\n    // headers.\n    // Missing value or null will disable header authentication.\n    // Eg. \"authService.headerLogin\"\n    \"headerAuth\": null,\n\n    // Header authentication resource method for WebSocket connections.\n    // Prior to responding to a WebSocket connection, this resource method will\n    // be called, allowing a service to set a token using information such as\n    // the request headers.\n    // Missing value or null will disable WebSocket header authentication.\n    // Eg. \"authService.headerLogin\"\n    \"wsHeaderAuth\": null,\n\n    // Encoding for web resources.\n    // Available encodings are:\n    // * json - JSON encoding with resource reference meta data.\n    // * jsonflat - JSON encoding without resource reference meta data.\n    \"apiEncoding\": \"json\",\n\n    // Call method name to map HTTP PUT method requests to.\n    // Eg. \"put\"\n    \"putMethod\": null,\n\n    // Call method name to map HTTP DELETE method requests to.\n    // Eg. \"delete\"\n    \"deleteMethod\": null,\n\n    // Call method name to map HTTP PATCH method requests to.\n    // Eg. \"patch\"\n    \"patchMethod\": null,\n\n    // Flag enabling WebSocket per message compression (RFC 7692).\n    \"wsCompression\": false,\n\n    // Throttle on how many requests are sent in response to a system reset.\n    // Once that the number of requests are sent, the server will await\n    // responses before sending more requests. Zero (0) means no throttling.\n    // Eg. 32\n    \"resetThrottle\": 0,\n\n    // Throttle on how many requests are sent when recursively following\n    // resource references for a subscription.\n    // Once that the number of requests are sent, the server will await\n    // responses before sending more requests. Zero (0) means no throttling.\n    // Eg. 32\n    \"referenceThrottle\": 0,\n\n    // Flag enabling tls encryption.\n    \"tls\": false,\n\n    // Certificate file path for tls encryption.\n    \"tlsCert\": \"\",\n\n    // Key file path for tls encryption.\n    \"tlsKey\": \"\",\n\n    // NATS User Credentials file.\n    // Eg. \"ngs.creds\"\n    \"natsCreds\": \"\",\n\n    // NATS Client certificate file.\n    // Eg. \"client-cert.pem\"\n    \"natsCert\": \"\",\n\n    // NATS Client certificate key file.\n    // Eg. \"client-key.pem\"\n    \"natsKey\": \"\",\n\n    // NATS Root CA files.\n    // Eg. [\"rootCA.pem\"]\n    \"natsRootCAs\": [],\n\n    // Allowed origin for CORS requests, or * to allow all origins.\n    // Multiple origins are separated by semicolon.\n    // Eg. \"https://example.com;https://api.example.com\"\n    \"allowOrigin\": \"*\",\n\n    // Flag enabling debug logging.\n    \"debug\": false,\n\n    // Flag enabling trace logging.\n    \"trace\": false\n}\n```\n\n## Running Resgate\n\nBy design, Resgate will exit if it fails to connect to the NATS server, or if it loses the connection.\nThis is to allow clients to try to reconnect to another Resgate instance and resume from there, and to give Resgate a fresh new start if something went wrong.\n\nA simple bash script can keep it running:\n\n```bash\n#!/bin/bash\nuntil ./resgate; do\n    echo \"Resgate exited with code $?.  Restarting..\" \u003e\u00262\n    sleep 2\ndone\n```\n\n## Documentation\n\nVisit [Resgate.io](https://resgate.io) for documentation and resources.\n\nIt has guides on [installation](https://resgate.io/docs/get-started/installation/), [configuration](https://resgate.io/docs/get-started/configuration/), [writing services](https://resgate.io/docs/writing-services/01hello-world/), [scaling](https://resgate.io/docs/advanced-topics/scaling/), [queries](https://resgate.io/docs/advanced-topics/query-resources/), and other useful things. It also contains guides for [ResClient](https://resgate.io/docs/writing-clients/resclient/) when working with frameworks such as [React](https://resgate.io/docs/writing-clients/using-react/), [Vue.js](https://resgate.io/docs/writing-clients/using-vuejs/), and [Modapp](https://resgate.io/docs/writing-clients/using-modapp/).\n\n## Support Resgate\n\nResgate is an MIT-licensed open source project where development is made possible through community support.\n\nIf you'd like help out, please consider:\n\n- [Make a one-time donation via PayPal](https://paypal.me/jirenius)\n- [Become a backer via GitHub Sponsors](https://github.com/sponsors/jirenius)\n\n\n## Contribution\n\nAny feedback on the protocol and its implementation is highly appreciated!\n\nIf you find any issues with the protocol or the gateway, feel free to [report them](https://github.com/resgateio/resgate/issues/new).\n\nIf you have created a service library, a client library, or some other tool or utility, please contact me to have it added to [the list of resources](https://resgate.io/docs/get-started/resources/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresgateio%2Fresgate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fresgateio%2Fresgate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresgateio%2Fresgate/lists"}