This repository was archived by the owner on Mar 29, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-14
lines changed
Expand file tree Collapse file tree 3 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 55 "db" : {
66 "host" : " C:/GitHub/Basic-LDES-Server/sources/database.sqlite"
77 },
8+ "entrypoint" : " https://apidg.gent.be/opendata/adlib2eventstream/v1/dmg/objecten" ,
89 "sources" : [
910
1011 {
1112 "route" : " /ldes-replication" ,
12- "sourceFile" : " dist/sources/mySource" ,
13- "entrypoint" : " https://apidg.gent.be/opendata/adlib2eventstream/v1/dmg/objecten" ,
13+ "sourceFile" : " dist/sources/mySource" ,
1414 "queryparam" : " generatedAtTime"
1515 },
16- {
17- "route" : " /crowdscan" ,
18- "sourceFile" : " dist/sources/crowdscanSource" ,
19- "entrypoint" : " https://production.crowdscan.be/dataapi/gent/gent_langemunt/data/5" ,
20- "sensors" : 1 ,
21- "environment" : " gent_langemunt" ,
22- "usesImportPages" :true ,
23- "importInterval" : 5000
24- },
2516 {
2617 "route" : " /import" ,
2718 "sourceFile" : " dist/sources/mySource-import" ,
2819 "usesImportPages" : true ,
2920 "importInterval" : 5000 ,
30- "entrypoint" : " https://apidg.gent.be/opendata/adlib2eventstream/v1/dmg/objecten" ,
3121 "queryparam" : " generatedAtTime"
3222 }
3323 ]
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ const rdfParser = require("rdf-parse").default;
99
1010export class mySource extends Source {
1111
12+ protected config : object ;
13+
1214 constructor ( config : object ) {
1315 super ( config ) ;
1416 }
Original file line number Diff line number Diff line change @@ -32,8 +32,10 @@ export class AppRunner {
3232 let route : String = element [ 'route' ] ;
3333 let locationOfSource = this . resolveFilePath ( element [ 'sourceFile' ] ) ;
3434 let MySource = require ( locationOfSource ) . mySource ;
35- //let mySource: Source = new MySource(config);
36- let mySource : Source = new MySource ( element ) ;
35+
36+ let config = element ;
37+ config [ 'entrypoint' ] = configuration [ 'entrypoint' ] || 'localhost' ;
38+ let mySource : Source = new MySource ( config ) ;
3739
3840 if ( element [ 'usesImportPages' ] != null && element [ 'usesImportPages' ] ) {
3941 mySource . setDatabaseModel ( db . createTable ( element [ 'route' ] ) ) ;
You can’t perform that action at this time.
0 commit comments