Skip to content
Cosmos DB, Express.js, Angular, and Node.js app
TypeScript JavaScript CSS HTML
Branch: master
Clone or download
John Papa John Papa
John Papa and John Papa fixed to work with docker
Latest commit 1e796be Sep 15, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode init Jul 15, 2017
e2e fixes Jul 16, 2017
src fixed to work with docker Sep 15, 2017
.angular-cli.json fixed to work with docker Sep 15, 2017
.dockerignore docker Aug 4, 2017
.editorconfig init Jul 15, 2017
.eslintrc.json init Jul 15, 2017
.gitignore add example env file Jul 15, 2017
Dockerfile fixed to work with docker Sep 15, 2017
README.md
TUTORIAL.md steps Aug 4, 2017
TUTORIAL_BREAKDOWN.md notes Aug 4, 2017
VIDEOS.md video Aug 4, 2017
karma.conf.js init Jul 15, 2017
package-lock.json ng 1.3 cli Aug 18, 2017
package.json ng 1.3 cli Aug 18, 2017
protractor.conf.js init Jul 15, 2017
tsconfig.json init Jul 15, 2017
tslint.json fixes Jul 16, 2017

README.md

Angular Cosmos DB

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

Docker

Create the Docker image and run it locally

dockerImage=angular-cosmosdb
docker build -t $dockerImage .
docker run -d -p 3000:80 $dockerImage

Requirements

  1. Install the Angular CLI

    npm install -g @angular/cli
  2. Install the Azure CLI

Getting Started

  1. Clone this repository

    git clone https://github.com/johnpapa/angular-cosmosdb.git
    cd angular-cosmosdb
  2. Install the npm packages

    npm i
  3. Configure Cosmos DB server settings

    Rename the example-environment.js file to environment.js in the server/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
    };

Running the app

  1. Build the Angular app

    ng build
  2. Launch the server

    node src/server/index.js
  3. Open the browser to http://localhost:3000

Problems or Suggestions

Open an issue here

You can’t perform that action at this time.