├── .github ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── LICENSE ├── README.md ├── app.js ├── config.js ├── data └── databaseContext.js ├── package-lock.json └── package.json /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 4 | > Please provide us with the following information: 5 | > --------------------------------------------------------------- 6 | 7 | ### This issue is for a: (mark with an `x`) 8 | ``` 9 | - [ ] bug report -> please search issues before submitting 10 | - [ ] feature request 11 | - [ ] documentation issue or request 12 | - [ ] regression (a behavior that used to work and stopped in a new release) 13 | ``` 14 | 15 | ### Minimal steps to reproduce 16 | > 17 | 18 | ### Any log messages given by the failure 19 | > 20 | 21 | ### Expected/desired behavior 22 | > 23 | 24 | ### OS and Version? 25 | > Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?) 26 | 27 | ### Versions 28 | > 29 | 30 | ### Mention any other details that might be useful 31 | 32 | > --------------------------------------------------------------- 33 | > Thanks! We'll be in touch soon. 34 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Purpose 2 | 3 | * ... 4 | 5 | ## Does this introduce a breaking change? 6 | 7 | ``` 8 | [ ] Yes 9 | [ ] No 10 | ``` 11 | 12 | ## Pull Request Type 13 | What kind of change does this Pull Request introduce? 14 | 15 | 16 | ``` 17 | [ ] Bugfix 18 | [ ] Feature 19 | [ ] Code style update (formatting, local variables) 20 | [ ] Refactoring (no functional changes, no api changes) 21 | [ ] Documentation content changes 22 | [ ] Other... Please describe: 23 | ``` 24 | 25 | ## How to Test 26 | * Get the code 27 | 28 | ``` 29 | git clone [repo-address] 30 | cd [repo-name] 31 | git checkout [branch-name] 32 | npm install 33 | ``` 34 | 35 | * Test the code 36 | 37 | ``` 38 | ``` 39 | 40 | ## What to Check 41 | Verify that the following are valid 42 | * ... 43 | 44 | ## Other Information 45 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | # next.js build output 61 | .next 62 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | --- 2 | page_type: sample 3 | languages: 4 | - javascript 5 | products: 6 | - azure 7 | description: "Azure Cosmos DB is a globally distributed multi-model database." 8 | urlFragment: azure-cosmos-db-sql-api-nodejs-getting-started 9 | --- 10 | 11 | # Developing a Node.js app using the Azure Cosmos DB SQL API 12 | 13 | Azure Cosmos DB is a globally distributed multi-model database. One of the supported APIs is the SQL API, which provides a JSON document model with SQL querying and JavaScript procedural logic. This sample shows you how to use Azure Cosmos DB with the SQL API to store and access data from a Node.js application. 14 | 15 | ## Running this sample 16 | 17 | This sample is designed to be run as part of the article, "[Quickstart: use Node.js to query an Azure Cosmos DB SQL API Database](https://docs.microsoft.com/en-us/azure/cosmos-db/create-sql-api-nodejs)". 18 | 19 | - Before you can run this sample, you must have the following perquisites: 20 | _ An active Azure Cosmos DB account - If you don't have an account, refer to the [Create an Azure Cosmos DB account](https://docs.microsoft.com/en-us/azure/cosmos-db/create-sql-api-nodejs#create-a-database-account) article. 21 | _ [Node.js](https://nodejs.org/en/) version v0.10.29 or higher. \* [Git](http://git-scm.com/). 22 | 23 | 1. Clone this repository using `git clone git@github.com:Azure-Samples/azure-cosmos-db-sql-api-nodejs-getting-started.git cosmosdb` 24 | 25 | 1. Change directories to the repo using `cd cosmosdb` 26 | 27 | 1. Next, substitute the endpoint and authorization key in `app.js` with your Azure Cosmos DB account's values. 28 | 29 | ``` 30 | const endpoint = ""; 31 | const key = ""; 32 | ``` 33 | 34 | 1. Run `npm install` in a terminal to install required npm modules 35 | 36 | 1. Run `node app.js` in a terminal to start your start your node application. 37 | 38 | ## About the code 39 | 40 | The code included in this sample is intended to get you quickly started with a Node.js console application that connects to Azure Cosmos DB with the SQL API. 41 | 42 | ## More information 43 | 44 | - [Azure Cosmos DB](https://docs.microsoft.com/azure/cosmos-db/introduction) 45 | - [Azure Cosmos DB: SQL API](https://docs.microsoft.com/en-us/azure/cosmos-db/sql-api-introduction) 46 | - [Azure Cosmos DB Node.js SDK](https://docs.microsoft.com/en-us/azure/cosmos-db/sql-api-sdk-node) 47 | - [Azure Cosmos DB Node.js SDK Reference Documentation](http://azure.github.io/azure-documentdb-node/) 48 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // 3 | const CosmosClient = require("@azure/cosmos").CosmosClient; 4 | const config = require("./config"); 5 | const dbContext = require("./data/databaseContext"); 6 | // 7 | 8 | // 9 | const newItem = { 10 | id: "3", 11 | category: "fun", 12 | name: "Cosmos DB", 13 | description: "Complete Cosmos DB Node.js Quickstart ⚡", 14 | isComplete: false 15 | }; 16 | // 17 | 18 | async function main() { 19 | 20 | // 21 | const { endpoint, key, databaseId, containerId } = config; 22 | 23 | const client = new CosmosClient({ endpoint, key }); 24 | 25 | const database = client.database(databaseId); 26 | const container = database.container(containerId); 27 | 28 | // Make sure Tasks database is already setup. If not, create it. 29 | await dbContext.create(client, databaseId, containerId); 30 | // 31 | 32 | try { 33 | // 34 | console.log(`Querying container: Items`); 35 | 36 | // query to return all items 37 | const querySpec = { 38 | query: "SELECT * from c" 39 | }; 40 | 41 | // read all items in the Items container 42 | const { resources: items } = await container.items 43 | .query(querySpec) 44 | .fetchAll(); 45 | 46 | items.forEach(item => { 47 | console.log(`${item.id} - ${item.description}`); 48 | }); 49 | // 50 | 51 | // 52 | /** Create new item 53 | * newItem is defined at the top of this file 54 | */ 55 | const { resource: createdItem } = await container.items.create(newItem); 56 | 57 | console.log(`\r\nCreated new item: ${createdItem.id} - ${createdItem.description}\r\n`); 58 | // 59 | 60 | // 61 | /** Update item 62 | * Pull the id and partition key value from the newly created item. 63 | * Update the isComplete field to true. 64 | */ 65 | const { id, category } = createdItem; 66 | 67 | createdItem.isComplete = true; 68 | 69 | const { resource: updatedItem } = await container 70 | .item(id, category) 71 | .replace(createdItem); 72 | 73 | console.log(`Updated item: ${updatedItem.id} - ${updatedItem.description}`); 74 | console.log(`Updated isComplete to ${updatedItem.isComplete}\r\n`); 75 | // 76 | 77 | // 78 | /** 79 | * Delete item 80 | * Pass the id and partition key value to delete the item 81 | */ 82 | const { resource: result } = await container.item(id, category).delete(); 83 | console.log(`Deleted item with id: ${id}`); 84 | // 85 | 86 | } catch (err) { 87 | console.log(err.message); 88 | } 89 | } 90 | 91 | main(); 92 | -------------------------------------------------------------------------------- /config.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | 3 | const config = { 4 | endpoint: "", 5 | key: "", 6 | databaseId: "Tasks", 7 | containerId: "Items", 8 | partitionKey: { kind: "Hash", paths: ["/category"] } 9 | }; 10 | 11 | module.exports = config; 12 | -------------------------------------------------------------------------------- /data/databaseContext.js: -------------------------------------------------------------------------------- 1 | // 2 | const config = require("../config"); 3 | const CosmosClient = require("@azure/cosmos").CosmosClient; 4 | 5 | /* 6 | // This script ensures that the database is setup and populated correctly 7 | */ 8 | async function create(client, databaseId, containerId) { 9 | const partitionKey = config.partitionKey; 10 | 11 | /** 12 | * Create the database if it does not exist 13 | */ 14 | const { database } = await client.databases.createIfNotExists({ 15 | id: databaseId 16 | }); 17 | console.log(`Created database:\n${database.id}\n`); 18 | 19 | /** 20 | * Create the container if it does not exist 21 | */ 22 | const { container } = await client 23 | .database(databaseId) 24 | .containers.createIfNotExists( 25 | { id: containerId, partitionKey }, 26 | { offerThroughput: 400 } 27 | ); 28 | 29 | console.log(`Created container:\n${container.id}\n`); 30 | } 31 | 32 | module.exports = { create }; 33 | // 34 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "azure-cosmosdb-sql-api-nodejs-getting-started", 3 | "version": "0.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@azure/cosmos": { 8 | "version": "3.5.2", 9 | "resolved": "https://registry.npmjs.org/@azure/cosmos/-/cosmos-3.5.2.tgz", 10 | "integrity": "sha512-RFVydMRoPsR2xn4DgBXeCTcqDQNK7hZS4qLDDXM6PdkAQ+avtcz2AkPAoTsJzqmuvUm7/AwFEV3ysy7isqFckQ==", 11 | "requires": { 12 | "@types/debug": "^4.1.4", 13 | "debug": "^4.1.1", 14 | "fast-json-stable-stringify": "^2.0.0", 15 | "node-abort-controller": "^1.0.4", 16 | "node-fetch": "^2.6.0", 17 | "os-name": "^3.1.0", 18 | "priorityqueuejs": "^1.0.0", 19 | "semaphore": "^1.0.5", 20 | "tslib": "^1.9.3", 21 | "uuid": "^3.3.2" 22 | } 23 | }, 24 | "@types/debug": { 25 | "version": "4.1.5", 26 | "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.5.tgz", 27 | "integrity": "sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ==" 28 | }, 29 | "cross-env": { 30 | "version": "7.0.2", 31 | "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.2.tgz", 32 | "integrity": "sha512-KZP/bMEOJEDCkDQAyRhu3RL2ZO/SUVrxQVI0G3YEQ+OLbRA3c6zgixe8Mq8a/z7+HKlNEjo8oiLUs8iRijY2Rw==", 33 | "dev": true, 34 | "requires": { 35 | "cross-spawn": "^7.0.1" 36 | }, 37 | "dependencies": { 38 | "cross-spawn": { 39 | "version": "7.0.3", 40 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", 41 | "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", 42 | "dev": true, 43 | "requires": { 44 | "path-key": "^3.1.0", 45 | "shebang-command": "^2.0.0", 46 | "which": "^2.0.1" 47 | } 48 | }, 49 | "path-key": { 50 | "version": "3.1.1", 51 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", 52 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", 53 | "dev": true 54 | }, 55 | "shebang-command": { 56 | "version": "2.0.0", 57 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", 58 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", 59 | "dev": true, 60 | "requires": { 61 | "shebang-regex": "^3.0.0" 62 | } 63 | }, 64 | "shebang-regex": { 65 | "version": "3.0.0", 66 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", 67 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", 68 | "dev": true 69 | }, 70 | "which": { 71 | "version": "2.0.2", 72 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 73 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 74 | "dev": true, 75 | "requires": { 76 | "isexe": "^2.0.0" 77 | } 78 | } 79 | } 80 | }, 81 | "cross-spawn": { 82 | "version": "6.0.5", 83 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", 84 | "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", 85 | "requires": { 86 | "nice-try": "^1.0.4", 87 | "path-key": "^2.0.1", 88 | "semver": "^5.5.0", 89 | "shebang-command": "^1.2.0", 90 | "which": "^1.2.9" 91 | } 92 | }, 93 | "debug": { 94 | "version": "4.1.1", 95 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 96 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 97 | "requires": { 98 | "ms": "^2.1.1" 99 | } 100 | }, 101 | "end-of-stream": { 102 | "version": "1.4.4", 103 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", 104 | "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", 105 | "requires": { 106 | "once": "^1.4.0" 107 | } 108 | }, 109 | "execa": { 110 | "version": "1.0.0", 111 | "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", 112 | "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", 113 | "requires": { 114 | "cross-spawn": "^6.0.0", 115 | "get-stream": "^4.0.0", 116 | "is-stream": "^1.1.0", 117 | "npm-run-path": "^2.0.0", 118 | "p-finally": "^1.0.0", 119 | "signal-exit": "^3.0.0", 120 | "strip-eof": "^1.0.0" 121 | } 122 | }, 123 | "fast-json-stable-stringify": { 124 | "version": "2.0.0", 125 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", 126 | "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" 127 | }, 128 | "get-stream": { 129 | "version": "4.1.0", 130 | "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", 131 | "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", 132 | "requires": { 133 | "pump": "^3.0.0" 134 | } 135 | }, 136 | "is-stream": { 137 | "version": "1.1.0", 138 | "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", 139 | "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" 140 | }, 141 | "isexe": { 142 | "version": "2.0.0", 143 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 144 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" 145 | }, 146 | "macos-release": { 147 | "version": "2.3.0", 148 | "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.3.0.tgz", 149 | "integrity": "sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA==" 150 | }, 151 | "ms": { 152 | "version": "2.1.2", 153 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 154 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 155 | }, 156 | "nice-try": { 157 | "version": "1.0.5", 158 | "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", 159 | "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" 160 | }, 161 | "node-abort-controller": { 162 | "version": "1.0.4", 163 | "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-1.0.4.tgz", 164 | "integrity": "sha512-7cNtLKTAg0LrW3ViS2C7UfIzbL3rZd8L0++5MidbKqQVJ8yrH6+1VRSHl33P0ZjBTbOJd37d9EYekvHyKkB0QQ==" 165 | }, 166 | "node-fetch": { 167 | "version": "2.6.0", 168 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", 169 | "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" 170 | }, 171 | "npm-run-path": { 172 | "version": "2.0.2", 173 | "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", 174 | "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", 175 | "requires": { 176 | "path-key": "^2.0.0" 177 | } 178 | }, 179 | "once": { 180 | "version": "1.4.0", 181 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 182 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 183 | "requires": { 184 | "wrappy": "1" 185 | } 186 | }, 187 | "os-name": { 188 | "version": "3.1.0", 189 | "resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz", 190 | "integrity": "sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==", 191 | "requires": { 192 | "macos-release": "^2.2.0", 193 | "windows-release": "^3.1.0" 194 | } 195 | }, 196 | "p-finally": { 197 | "version": "1.0.0", 198 | "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", 199 | "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" 200 | }, 201 | "path-key": { 202 | "version": "2.0.1", 203 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", 204 | "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" 205 | }, 206 | "priorityqueuejs": { 207 | "version": "1.0.0", 208 | "resolved": "https://registry.npmjs.org/priorityqueuejs/-/priorityqueuejs-1.0.0.tgz", 209 | "integrity": "sha1-LuTyPCVgkT4IwHzlzN1t498sWvg=" 210 | }, 211 | "pump": { 212 | "version": "3.0.0", 213 | "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", 214 | "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", 215 | "requires": { 216 | "end-of-stream": "^1.1.0", 217 | "once": "^1.3.1" 218 | } 219 | }, 220 | "semaphore": { 221 | "version": "1.1.0", 222 | "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", 223 | "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==" 224 | }, 225 | "semver": { 226 | "version": "5.7.1", 227 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 228 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" 229 | }, 230 | "shebang-command": { 231 | "version": "1.2.0", 232 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", 233 | "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", 234 | "requires": { 235 | "shebang-regex": "^1.0.0" 236 | } 237 | }, 238 | "shebang-regex": { 239 | "version": "1.0.0", 240 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", 241 | "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" 242 | }, 243 | "signal-exit": { 244 | "version": "3.0.2", 245 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", 246 | "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" 247 | }, 248 | "strip-eof": { 249 | "version": "1.0.0", 250 | "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", 251 | "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" 252 | }, 253 | "tslib": { 254 | "version": "1.10.0", 255 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", 256 | "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" 257 | }, 258 | "uuid": { 259 | "version": "3.3.3", 260 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", 261 | "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==" 262 | }, 263 | "which": { 264 | "version": "1.3.1", 265 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", 266 | "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", 267 | "requires": { 268 | "isexe": "^2.0.0" 269 | } 270 | }, 271 | "windows-release": { 272 | "version": "3.2.0", 273 | "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.2.0.tgz", 274 | "integrity": "sha512-QTlz2hKLrdqukrsapKsINzqMgOUpQW268eJ0OaOpJN32h272waxR9fkB9VoWRtK7uKHG5EHJcTXQBD8XZVJkFA==", 275 | "requires": { 276 | "execa": "^1.0.0" 277 | } 278 | }, 279 | "wrappy": { 280 | "version": "1.0.2", 281 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 282 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 283 | } 284 | } 285 | } 286 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "azure-cosmosdb-sql-api-nodejs-getting-started", 3 | "version": "0.0.0", 4 | "description": "A short sample app to demonstrate how to get started with Azure Cosmos DB's SQL API", 5 | "main": "app.js", 6 | "scripts": { 7 | "start": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 node app.js" 8 | }, 9 | "dependencies": { 10 | "@azure/cosmos": "3.5.2" 11 | }, 12 | "devDependencies": { 13 | "cross-env": "^7.0.2" 14 | } 15 | } --------------------------------------------------------------------------------