services | platforms | author |
---|---|---|
cosmos-db |
nodejs |
jopapa |
by John Papa
You can watch me build the app as part of my series here
You can view all videos together here
Learn more about developing Node.js apps with Azure's cloud services here
-
Install the Angular CLI
npm install -g @angular/cli
-
Install the Azure CLI
-
Clone this repository
git clone https://github.com/johnpapa/angular-cosmosdb.git cd angular-cosmosdb
-
Install the npm packages
npm i
-
Configure Cosmos DB server settings
Rename the
example-environment.js
file toenvironment.js
in theserver/env/
folder and update it with your Cosmos DB settings. Replace the account, database name, key, and port with your specific configuration.// server/env/environment.js module.exports = { accountName: 'your-cosmosdb-account-name-goes-here', databaseName: 'your-cosmosdb-database-name-goes-here', key: 'your-key-goes-here', port: 10255 };
-
Build the Angular app
ng build
-
Launch the server
node src/server/index.js
-
Open the browser to http://localhost:3000