TODO app using Express JS and MongoDB

From many days I was willing to learn Node JS. And I am very much impressed with Express JS (web framework for Node.js). It’s just awesome.

Very minimal learning curve, very fast to start and develop anything will be much faster.

So what you have to do first install node obviously and MongoDB as well. Then to manage the dependency and install packages you need npm. Through npm you can install all the packages. I will not go through the all the details like installation and so on. just want to share my thoughts via this application.

So If you wanna interested to start from or explore any existing app then take mine 🙂

Within parent directory only models, views, router and app.js that’s it and TODO app is ready.

I have used these packages for the todo app.

"dependencies": {
    "body-parser": "~1.10.0",
    "cookie-parser": "~1.3.3",
    "express": "~4.10.6",
    "express-session": "~1.9.3",
    "mongoose": "~3.8.21",
    "passport": "~0.2.1",
    "passport-local": "~1.0.0",
    "ejs": "~1.0.0",
    "passport-http": "~0.2.2"
},

What package are doing what, to see that just go to the npmjs and search via the package name then you can see the details.

As I have used bootstrap to design. So using bower you can install front end dependencies very easily.

"dependencies": {
    "bootstrap": "~3.3.1"
}

Whatever I just want to share the experience of Tasting  node js via Express. So I made a very simple and basic TODO app using Express JS and MongoDB as a database. You can clone or download the source code form the download link.

download

 

And start exploring Express. After Download, goto the app directory then run following commands.


$1: npm install   // To install all the node packages

$2: npm install -g bower // Install bower, If not already installed

$3: bower install  // To install front end dependencies

$4: npm install -g nodemon // To see the live change

$5: nodemon app.js  // To RUN the app. 

App listening to the 3000 port. So browse http://localhost:3000 . You will get the homepage.

So What have in my small tiny app.

  • User Registration
  • User Login
  • User Basis task listing
  • User can add, edit, delete and checked any task

That’s it.

Here is the screenshot of TODO app for now, hopefully will add the demo very soon 🙂 .

 

registration

login

 

 

 

 

 

 

 

 

 

 

 

 

todoList

 

 

 

 

hadiList

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

So That’s it. I can understand, that It would be better if i can give brief in my coding level. Actually I have a plan to make screen cast on it. So for now, just install node, npm, mongoDB. Then clone/download my project and see how awesome is this.

So now Explore the Express.

Hope you will enjoy it. Thanks 🙂

Advertisements

3 thoughts on “TODO app using Express JS and MongoDB

    • Emran Ul hadi says:

      Thanks 🙂

      I have checked your post as well and found it very well elaborate.

      Keep it up good work.

  1. Hi Emran, I git clone your project, and followed the instructions below to run it, but I couldn’t make it work. Port 3000 always shows “cannot get”. I used the local mongodb, “todos”. Could you help me think what might go wrong? Thank you very much.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s