TODO App using Node, mongo, express and angular

In this tutorial, we will learn how to create TODO App using Node.js, mongoose, express and angular.js.

Prerequisites

  • Node.js
  • MongoDB
  • Express

Before creating TODO App using Node.js,mongoose(MongoDB Module for Node),express and angular.js we need to install Node.js, express and MongoDB in our system.We can download and install these software by following link :-

Node.Js :- Install Node.Js
MongoDB :- Install MongoDB
Express :- Install Express

Once you installed software in your system, you can check its installed or not by following command :-

Check Node.Js installation :-

Check MongoDB installation :-

Check express installation :-

Setting Up Our Application

Now we will create project folder and we will do setup for node.js TODO application.

Now we will create package.json file and we will define all the dependency of our node application.

package.json

Here we are going to use express and mongoose package so we defined in dependencies.
Now we will run the following command to install all packages through npm.

After running this command node_modules folder is created in out project directory.we can check all installed model by running this command in terminal also :-

Folder Structure of TODO App

todo-app-example

config.json [Define All configuration here]

We will define all configuration of project in config.json file.

Here dbPath is the path of mongoDB for connection and todo is our database name.
port is used for running the Node.js application on this particular port number.We can change these setup anytime according to our requirement.

Application Setup [app.js]

here we define the application setup of express application, which will run on port number 6633 as we defined in config.json file.We have also defined the routes for this application in this file only.

About Ritesh Kumar

I am Full Stack Developer and Blogger from Bangalore, India.

Leave a Reply

Your email address will not be published. Required fields are marked *