diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9951e9f..196053d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,11 @@ jobs: run: | cd cosmos npm install --save @azure/cosmos - npm i -g rimraf && npm run build + npm run build + + - name: Generate the connector configuration + run: | + ./dist/cli/index.js update - name: Start connector run: | diff --git a/script/app.js b/script/app.js index f806881..f2cb330 100644 --- a/script/app.js +++ b/script/app.js @@ -5,13 +5,13 @@ const cosmosClient = new CosmosClient({ key: 'C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==' }) -process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0 +// process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0 const { database } = await cosmosClient.databases.createIfNotExists({ id: 'ConnectorTest', throughput: 400 }) - + const { container } = await database.containers.createIfNotExists({ id: 'NobelLaureates', partitionKey: { @@ -19,7 +19,7 @@ const { database } = await cosmosClient.databases.createIfNotExists({ '/year' ] }, - indexingPolicy: { + indexingPolicy: { automatic: true, indexingMode: "consistent", includedPaths: [ @@ -85,4 +85,4 @@ for (const prize of prizes_data) { container.items.upsert(prize) i++; } -console.log(i) \ No newline at end of file +console.log(i)