Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

everydev/documentdb-node-todo-app

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

services documentdb
platforms nodejs
author ryancrawcour

Web application development with Node.js and Express using DocumentDB

This sample shows you how to use the Microsoft Azure DocumentDB service to store and access data from a Node.js Express application hosted on Azure Websites.

My ToDo List Node.js application

For a complete end-to-end walk-through of creating this application, please refer to the full tutorial on the Azure documentation page

Running this sample

  1. Before you can run this sample, you must have the following perquisites:

  2. Clone this repository, or download the zip file.

  3. Retrieve the URI and PRIMARY KEY (or SECONDARY KEY) values from the Keys blade of your DocumentDB account in the Azure Preview portal. For more information on obtaining endpoint & keys for your DocumentDB account refer to How to manage a DocumentDB account

    If you don't have an account, see Create a DocumentDB database account to set one up.

  4. In the config.js file, located in the src folder, find config.host and config.authKey and replace the placeholder values with the values obtained for your account.

  5. Run npm start in a terminal to start your start your node application, and launch a browser and navigate to http://127.0.0.1:3000/ My ToDo List Node.js application

Deploy this sample to Azure

  1. If you haven't already, enable a git repository for your Azure Website. You can find instructions on how to do this here.

  2. Add your Azure Website as a git remote.

     git remote add azure https://username@your-website.scm.azurewebsites.net:443/your-website.git
    
  3. Deploy by pushing to the remote.

     git push azure master
    
  4. In a few seconds, git will finish publishing your web application and launch a browser where you can see your handy work running in Azure!

About the code

The code included in this sample is intended to get you going with a simple Node.js Express application that connects to Azure DocumentDB with the express intent of demonstrating how to interact with DocumentDB using the documentdb npm package. It is not intended to be a set of best practices on how to build scalable enterprise grade web applications. This is beyond the scope of this quick start sample.

More information

About

This sample shows you how to use the Microsoft Azure DocumentDB service to store and access data from a Node.js Express application hosted on Azure Websites.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 80.7%
  • HTML 16.8%
  • CSS 2.5%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.