Skip to content

jahlen/Planetzine

Repository files navigation

Planetzine

A sample app using Azure Cosmos DB.

This project shows how to build a news web app that uses a globally distributed Azure Cosmos DB. It demonstrates the following functionality:

  • Reading from the nearest database location ("local reads")
  • Search articles by author, tags or full-text search
  • Populating with sample articles (from Wikipedia)
  • Measuring the number of Request Units consumed

Setup

Test in Azure

Deploy to Azure

Click the "Deploy to Azure" button. You must chose a unique Site Name, for example planetzine-yourname.

Have patience! The deployment in the Azure Portal can take around 10 minutes.

Note that to support Azure Traffic Manager, you must select at least Sku S1.

Develop and test locally

  • Create an Azure Cosmos DB account in Azure (or use the Azure Cosmos DB Emulator). Select the SQL API.
  • Download the source code and open in Visual Studio. Edit Web.config.
    • EndpointURL and AuthKey must be changed to point to your Azure Cosmos DB account
    • The remaining parameters can optionally be changed, but their default values should work.

You can create an Azure Cosmos DB account for free here.

More reading

Visit my blog for more reading about Azure Cosmos DB

Screenshots

Planetzine screenshot 1 Planetzine screenshot 2