Skip to content

Commit

Permalink
Feature/facade (#4)
Browse files Browse the repository at this point in the history
* progress

* removing packages

* cleanup npmignore

* golden release
  • Loading branch information
ConfigCat authored Nov 8, 2018
1 parent b183be8 commit eea6ac7
Show file tree
Hide file tree
Showing 23 changed files with 69 additions and 2,300 deletions.
7 changes: 5 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
.vscode/
node_modules/
src/
sample/
tests/
samples/
test/
coverage/
gulpfile.js
package-lock.json
tsconfig.json
.gitignore
.travis.yml
*.tgz
*.log
.idea/
.nyc_output/
20 changes: 0 additions & 20 deletions .vscode/launch.json

This file was deleted.

20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ ConfigCat is a cloud based configuration as a service. It integrates with your a
https://configcat.com

[![Build Status](https://travis-ci.org/configcat/node-sdk.svg?branch=master)](https://travis-ci.org/configcat/node-sdk) [![codecov](https://codecov.io/gh/configcat/node-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/configcat/node-sdk) [![Known Vulnerabilities](https://snyk.io/test/github/configcat/node-sdk/badge.svg?targetFile=package.json)](https://snyk.io/test/github/configcat/node-sdk?targetFile=package.json) ![License](https://img.shields.io/github/license/configcat/node-sdk.svg) \
[![NPM](https://nodei.co/npm/configcat-client-node.png)](https://nodei.co/npm/configcat-client-node/)
[![NPM](https://nodei.co/npm/configcat-node.png)](https://nodei.co/npm/configcat-node/)

## Getting Started

1. Install [NPM](https://docs.npmjs.com/cli/install) package: [configcat-client-node]( https://npmjs.com/package/configcat-client-node)
1. Install [NPM](https://docs.npmjs.com/cli/install) package: [configcat-node]( https://npmjs.com/package/configcat-node)
```PowerShell
npm i configcat-client-node
npm i configcat-node
```
2. Get your Api Key from [configcat.com](https://configcat.com) portal:
![API-KEY](https://raw.githubusercontent.com/ConfigCat/.net-sdk/master/media/readme02.png "API-KEY")

3. Create a **ConfigCatClient** instance:
```javascript
var configcat = require("configcat-client-node");
var configcat = require("configcat-node");

var client = configcat.createClient("#YOUR-API-KEY#");
```
Expand Down Expand Up @@ -126,17 +126,5 @@ var myUser = {
## Lifecycle of the client
We're recommend to use client as a singleton in your application.

## Logging
We use Winston for logging you can setup with 'logger' attribute.
``` javascript
var config = {
"logger": new winston.Logger({
level: "info",
transports: [
new winston.transports.Console({ timestamp: true })
]})
};
```

## License
[MIT](https://raw.githubusercontent.com/ConfigCat/node-sdk/master/LICENSE)
25 changes: 14 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "configcat-client-node",
"version": "2.0.11",
"description": "ConfigCat is a cloud based configuration as a service. It integrates with your apps, backends, websites, and other programs, so you can configure them through this website (https://www.configcat.com) even after they are deployed.",
"name": "configcat-node",
"version": "2.1.0",
"description": "ConfigCat is a configuration as a service that lets you manage your features and configurations without actually deploying new code.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
Expand All @@ -13,22 +13,25 @@
"configcat",
"config",
"configuration",
"remoteconfiguration",
"configcatclient"
"remote configuration",
"configcat client",
"feature flags",
"feature toggle",
"feature switch",
"canary release",
"soft launch",
"release strategy"
],
"author": "ConfigCat",
"license": "MIT",
"dependencies": {
"big-integer": "^1.6.36",
"events": "^2.0.0",
"node-sha1": "^1.0.1",
"request": "^2.85.0",
"winston": "^2.4.2"
"configcat-common": "^1.0.2",
"request": "^2.85.0"
},
"devDependencies": {
"@types/chai": "^4.1.7",
"@types/mocha": "^5.2.5",
"@types/node": "^10.12.2",
"@types/node": "^10.12.3",
"chai": "^4.2.0",
"del": "^3.0.0",
"mocha": "^5.2.0",
Expand Down
7 changes: 6 additions & 1 deletion samples/console/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var configcat = require("configcat-client");
var configcat = require("configcat-node");

// Insert your API key
var client = configcat.createClient("PKDVCLf-Hq-h-kCzMp-L7Q/PaDVCFk9EpmD6sLpGLltTA");
Expand All @@ -10,4 +10,9 @@ var myUser = {
// Get your config value:
client.getValue("keySampleText", "N/A", myUser, (value) => {
console.log("keySampleText: " + value);
});

// Get your config value:
client.getValue("keySampleText_NOTEXISTS", "N/A", myUser, (value) => {
console.log("keySampleText: " + value);
});
2 changes: 1 addition & 1 deletion samples/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"author": "configcat",
"license": "MIT",
"dependencies": {
"configcat-client": "2.0.0"
"configcat-node": "2.1.0"
}
}
65 changes: 0 additions & 65 deletions src/AutoPollConfigService.ts

This file was deleted.

22 changes: 0 additions & 22 deletions src/Cache.ts

This file was deleted.

97 changes: 0 additions & 97 deletions src/ConfigCatClientConfiguration.ts

This file was deleted.

Loading

0 comments on commit eea6ac7

Please sign in to comment.