-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#8 added addDataSources convenience method for sequential addDataSour…
…ce requests
- Loading branch information
1 parent
66cd33f
commit e557374
Showing
3 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { SzGrpcEnvironment } from '@senzing/sz-sdk-typescript-grpc'; | ||
|
||
const szEnvironment = new SzGrpcEnvironment({connectionString: `0.0.0.0:8261`}); | ||
const DATASOURCES_TO_ADD = ['CUSTOMERS', 'REFERENCE', 'WATCHLIST']; | ||
|
||
// create new config and get handle | ||
szEnvironment.getConfig().createConfig().then((configHandle) => { | ||
// now add datasources | ||
szEnvironment.getConfig().addDataSources(configHandle as number, DATASOURCES_TO_ADD).then((results) => { | ||
console.log(`Added Data Sources: \n\r`, results); | ||
}). | ||
catch((err) => { | ||
console.error(err); | ||
}); | ||
}).catch((err) => { | ||
console.error(err); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters