{"id":14964327,"url":"https://github.com/configcat/js-ssr-sdk","last_synced_at":"2026-04-14T10:01:33.469Z","repository":{"id":38827158,"uuid":"252246753","full_name":"configcat/js-ssr-sdk","owner":"configcat","description":"ConfigCat SDK for JavaScript Server Side Rendered applications like NuxtJS. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.","archived":false,"fork":false,"pushed_at":"2026-04-13T08:36:07.000Z","size":2329,"stargazers_count":12,"open_issues_count":2,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-04-13T10:31:37.836Z","etag":null,"topics":["configcat-sdk","feature-flags","feature-management","feature-toggle","javascript","nuxtjs","remote-config","sdk","server-side-rendering","ssr"],"latest_commit_sha":null,"homepage":"https://configcat.com/docs/sdk-reference/js-ssr","language":"TypeScript","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/configcat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-01T17:47:41.000Z","updated_at":"2026-04-07T12:01:37.000Z","dependencies_parsed_at":"2023-12-24T03:48:58.523Z","dependency_job_id":"9a0199ed-6cce-43d5-8f0b-bb3df47ba1b0","html_url":"https://github.com/configcat/js-ssr-sdk","commit_stats":{"total_commits":156,"total_committers":13,"mean_commits":12.0,"dds":0.6794871794871795,"last_synced_commit":"e1f3dd71ea3c9e41a11a05609853d3634839f766"},"previous_names":["configcat/nuxt-sdk"],"tags_count":53,"template":false,"template_full_name":null,"purl":"pkg:github/configcat/js-ssr-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fjs-ssr-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fjs-ssr-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fjs-ssr-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fjs-ssr-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/configcat","download_url":"https://codeload.github.com/configcat/js-ssr-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/configcat%2Fjs-ssr-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31791171,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["configcat-sdk","feature-flags","feature-management","feature-toggle","javascript","nuxtjs","remote-config","sdk","server-side-rendering","ssr"],"created_at":"2024-09-24T13:32:59.580Z","updated_at":"2026-04-14T10:01:33.462Z","avatar_url":"https://github.com/configcat.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"| :mega: Important notice |\r\n|-------------------------|\r\n| This SDK is superseded by the [new, unified ConfigCat SDK for JavaScript](https://github.com/configcat/js-unified-sdk#configcat-sdk-for-javascript).\u003cbr/\u003eThis legacy SDK is in maintenance mode now, it will receive only critical security patches until **official support ends on August 31, 2026**.\u003cbr/\u003e We recommend migrating to the new SDK as described [here](https://configcat.com/docs/sdk-reference/js-ssr/#migration-to-the-new-sdk). |\r\n\r\n# ConfigCat SDK for JavaScript Server Side Rendered applications\r\nhttps://configcat.com\r\n\r\nConfigCat SDK for Server Side Rendered apps provides easy integration with ConfigCat feature flags.\r\n\r\nConfigCat is a feature flag and configuration management service that lets you separate releases from deployments. You can turn your features ON/OFF using \u003ca href=\"https://app.configcat.com\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e even after they are deployed. ConfigCat lets you target specific groups of users based on region, email or any other custom user attribute.\r\n\r\nConfigCat is a \u003ca href=\"https://configcat.com\" target=\"_blank\"\u003ehosted feature flag service\u003c/a\u003e. Manage feature toggles across frontend, backend, mobile, desktop apps. \u003ca href=\"https://configcat.com\" target=\"_blank\"\u003eAlternative to LaunchDarkly\u003c/a\u003e. Management app + feature flag SDKs.\r\n\r\n[![JS-SSR CI](https://github.com/configcat/js-ssr-sdk/actions/workflows/js-ssr-ci.yml/badge.svg?branch=master)](https://github.com/configcat/js-ssr-sdk/actions/workflows/js-ssr-ci.yml) \r\n[![codecov](https://codecov.io/gh/configcat/js-ssr-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/configcat/js-ssr-sdk) \r\n[![Known Vulnerabilities](https://snyk.io/test/github/configcat/js-ssr-sdk/badge.svg?targetFile=package.json)](https://snyk.io/test/github/configcat/js-ssr-sdk?targetFile=package.json) \r\n![License](https://img.shields.io/github/license/configcat/js-ssr-sdk.svg) \r\n[![](https://data.jsdelivr.com/v1/package/npm/configcat-js-ssr/badge)](https://www.jsdelivr.com/package/npm/configcat-js-ssr)\r\n[![NPM](https://nodei.co/npm/configcat-js-ssr.png)](https://nodei.co/npm/configcat-js-ssr/)\r\n\r\n## Getting Started\r\n\r\n### 1. Install and import package:\r\n\r\n*via NPM [package](https://npmjs.com/package/configcat-js-ssr):*\r\n```PowerShell\r\nnpm i configcat-js-ssr\r\n```\r\n```js\r\nimport * as configcat from \"configcat-js-ssr\";\r\n```\r\n\r\n### 2. Go to the \u003ca href=\"https://app.configcat.com/sdkkey\" target=\"_blank\"\u003eConfigCat Dashboard\u003c/a\u003e to get your *SDK Key*:\r\n![SDK-KEY](https://raw.githubusercontent.com/ConfigCat/js-ssr-sdk/master/media/readme02-3.png  \"SDK-KEY\")\r\n\r\n### 3. Create a *ConfigCat* client instance:\r\n```js\r\nconst configCatClient = configcat.getClient(\"#YOUR-SDK-KEY#\");\r\n```\r\n\r\n\u003e You can acquire singleton client instances for your SDK keys using the `getClient(\"\u003csdkKey\u003e\")` factory function.\r\n(However, please keep in mind that subsequent calls to `getClient()` with the *same SDK Key* return a *shared* client instance, which was set up by the first call.)\r\n\r\n### 4. Get your setting value:\r\nThe async/await way:\r\n```js\r\nconst value = await configCatClient.getValueAsync('isMyAwesomeFeatureEnabled', false);\r\n\r\nif (value) {\r\n  do_the_new_thing();\r\n} else {\r\n  do_the_old_thing();\r\n}\r\n```\r\nor the Promise way:\r\n```js\r\nconfigCatClient.getValueAsync('isMyAwesomeFeatureEnabled', false)\r\n  .then((value) =\u003e {\r\n    if (value) {\r\n      do_the_new_thing();\r\n    } else {\r\n      do_the_old_thing();\r\n    }\r\n  });\r\n```\r\n\r\n## Getting user specific setting values with Targeting\r\nUsing this feature, you will be able to get different setting values for different users in your application by passing a `User Object` to `getValue()` or `getValueAsync()`.\r\n\r\nRead more about [Targeting here](https://configcat.com/docs/advanced/targeting/).\r\n```js\r\nconst userObject = new configcat.User(\"#USER-IDENTIFIER#\");\r\nconst value = await configCatClient.getValueAsync('isMyAwesomeFeatureEnabled', false, userObject);\r\n\r\nif (value) {\r\n  do_the_new_thing();\r\n} else {\r\n  do_the_old_thing();\r\n}\r\n```\r\n\r\n## Sample/Demo apps\r\n  - [NuxtJS](https://github.com/configcat/js-ssr-sdk/tree/master/samples/nuxt-ssr)\r\n\r\n## Polling Modes\r\nThe ConfigCat SDK supports 3 different polling mechanisms to acquire the setting values from ConfigCat. After latest setting values are downloaded, they are stored in the internal cache then all requests are served from there. Read more about Polling Modes and how to use them at [ConfigCat Docs](https://configcat.com/docs/sdk-reference/js-ssr).\r\n\r\n## Sensitive information handling\r\n\r\nThe frontend/mobile SDKs are running in your users' browsers/devices. The SDK is downloading a [config.json](https://configcat.com/docs/requests/) file from ConfigCat's CDN servers. The URL path for this config.json file contains your SDK key, so the SDK key and the content of your config.json file (feature flag keys, feature flag values, targeting rules, % rules) can be visible to your users. \r\nThis SDK key is read-only, it only allows downloading your config.json file, but nobody can make any changes with it in your ConfigCat account.  \r\nSuppose you don't want your SDK key or the content of your config.json file visible to your users. In that case, we recommend you use the SDK only in your backend applications and call a backend endpoint in your frontend/mobile application to evaluate the feature flags for a specific application customer.  \r\nAlso, we recommend using [sensitive targeting comparators](https://configcat.com/docs/advanced/targeting/#sensitive-text-comparators) in the targeting rules of those feature flags that are used in the frontend/mobile SDKs.\r\n\r\n## Browser compatibility\r\nThis SDK should be compatible with all modern browsers.\r\n\r\nThe SDK is [tested](https://github.com/configcat/js-ssr-sdk/blob/master/.github/workflows/js-ssr-ci.yml) against the following browsers:\r\n- Chrome (stable, latest, beta)\r\n- Chromium (64.0.3282.0, 72.0.3626.0, 80.0.3987.0)\r\n- Firefox (latest, latest-beta, 84.0).\r\n\r\nThese tests are running on each pull request, before each deploy, and on a daily basis. \r\nYou can view a sample run [here](https://github.com/configcat/js-ssr-sdk/actions/runs/2420724478).\r\n\r\n## Need help?\r\nhttps://configcat.com/support\r\n\r\n## Contributing\r\nContributions are welcome.\r\n\r\n## About ConfigCat\r\n- [Official ConfigCat SDK's for other platforms](https://github.com/configcat)\r\n- [Documentation](https://configcat.com/docs)\r\n- [Blog](https://blog.configcat.com)\r\n\r\n# Troubleshooting\r\n### Make sure you have the proper Node.js version installed\r\nYou might run into errors caused by the wrong version of Node.js. To make sure you are using the recommended Node.js version follow these steps.\r\n\r\n1. Have nvm (Node Version Manager - https://github.com/nvm-sh/nvm ) installed:\r\n1. Run `nvm install`. This will install the compatible version of Node.js.\r\n1. Run `nvm use`. This will use the compatible version of Node.js.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fjs-ssr-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconfigcat%2Fjs-ssr-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconfigcat%2Fjs-ssr-sdk/lists"}