by John Papa
You can watch me build the app as part of my series here
-
Install the Angular CLI
npm install -g @angular/cli
-
Install the Azure CLI
-
Clone this repository
git clone https://github.com/johnpapa/angular-cosmos.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 database name key, and port with your specific configuration.// server/env/environment.js const cosmosPort = 1234; // replace with your port const dbName = 'your-cosmos-db-name-goes-here'; const key = 'your-key-goes-here'; module.exports = { cosmosPort, dbName, key };
-
Build the Angular app
ng build
-
Launch the server
node src/server/index.js
-
Open the browser to http://localhost:3000