/todo_node

Todo app with Node.js. MongoDB as database. HTML/JSON response for CRUD operation.

Primary LanguageJavaScript

Todo Node.JS Project

This project is basic guidelines for a Node.JS beginner.

Objective:

  • Create, Retrieve, Update and Delete(CRUD) for todo task.

Technology used for development:

  1. OS: Ubuntu| Version 14.04
  2. Database: MongoDB | Version 3.4.10
  3. Node.js web application: Express
  4. Browser: Chromium
  5. HTTP Client CLI: curl

Please prefer the latest version as possible

Alternative OS, Browser and HTTP Client CLI can be used to run this app.

Development

  1. Understand MongoDB database
  2. Create a basic Node project
  3. Routing and HTML page rendering
  4. Working with database
  5. Page design with Twitter Bootstrap
  6. API development

Git branching

  • Final app is in master branch
  • For each task, branch name with pattern DEV-Task Number, like DEV-1

Using Markdown files

Routes

Route Method Response Content Type Remark
/users GET HTML Render users list page
/ GET HTML Redirect to /users
/users/new GET HTML Render create new user form
/users/:userId GET HTML Render the user detail page
/users POST HTML Create new user and Render the user detail page
/users/:userId/edit GET HTML Render the user edit form
/users/:userId PUT HTML Update the user and Render the user detail page
/users/:userId DELETE HTML Delete the user and Render users list page
/users GET JSON List User
/users POST JSON Create new User
/users/:userId PUT JSON Update a user
/users/:userId DELETE JSON DELETE