A Simple Login Application in Node.js and MongoDB

Table of contents
Reading Time: < 1 minute

Node.js, a software platform, built on google chrome runtime. It uses v8, the same run time environment, that google chrome uses. It is one of the best plateform to easily build scalable network applications(especially server-side).

We have created Node.js Login Template with a nice User Interface. If you want to use Node.js as plateform and MongoDB as Database then this demo project can be used as a starting point for your application.

This is a simple application, which has sign up and login facility after successfully registration. We’ll be adding some more features in this application very soon such as birthday reminder functionality.

Screenshot from 2014-03-06 01:35:50

Here are the steps to start with code:-

You can also check the CRUD operations’ on NodeJs here step by step.

Written by 

Ayush is the Sr. Lead Consultant @ Knoldus Software LLP. In his 10 years of experience he has become a developer with proven experience in architecting and developing web applications. Ayush has a Masters in Computer Application from U.P. Technical University, Ayush is a strong-willed and self-motivated professional who takes deep care in adhering to quality norms within projects. He is capable of managing challenging projects with remarkable deadline sensitivity without compromising code quality.

13 thoughts on “A Simple Login Application in Node.js and MongoDB1 min read

  1. Its very tough to run npm install with the above package.json .. as it needs lots of prerequisites .. can you please execute npm install and provide node_modules directory path.. so that i can use this login module..

  2. Hello ,

    After running npm install i am getting the following error.

    npm ERR! node-proxy@1.0.0 install: `node-gyp configure build`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the node-proxy@1.0.0 install script ‘node-gyp configure build’.
    npm ERR! This is most likely a problem with the node-proxy package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR! node-gyp configure build
    npm ERR! You can get their info via:
    npm ERR! npm owner ls node-proxy
    npm ERR! There is likely additional logging output above.

    npm ERR! Please include the following file with any support request:
    npm ERR! /var/www/nodeProject/Node.js_UserLogin_Template/npm-debug.log

    1. Can you try upgrading node-gyp as well?
      it worked out for me!!!!!
      npm install -g node-gyp

  3. 0 info it worked if it ends with ok
    1 verbose cli [ ‘C:\\Program Files\\nodejs\\node.exe’,
    1 verbose cli ‘C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js’,
    1 verbose cli ‘start’ ]
    2 info using npm@2.15.8
    3 info using node@v4.4.7
    4 verbose stack Error: missing script: start
    4 verbose stack at run (C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:142:19)
    4 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\run-script.js:58:5
    4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:356:5
    4 verbose stack at checkBinReferences_ (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:320:45)
    4 verbose stack at final (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:354:3)
    4 verbose stack at then (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:124:5)
    4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:243:12
    4 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:78:16
    4 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)
    5 verbose cwd C:\Program Files\MongoDB\Server\3.2\bin
    6 error Windows_NT 10.0.10586
    7 error argv “C:\\Program Files\\nodejs\\node.exe” “C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js” “start”
    8 error node v4.4.7
    9 error npm v2.15.8
    10 error missing script: start
    11 error If you need help, you may report this error at:
    11 error
    12 verbose exit [ 1, true ]

    I am getting an error like this how to fix it???????????????????????

  4. How to create a log in and registration page using mongodb with node.js and android application development? I’ve the UI ready but I don’t understand how to code to populate the database using the User Interface.

    1. Hi, This is very simple and follows the steps
      for windows : download 1. mongoDB 3.2 setup
      2. create directory in c://
      3. data and
      4. inside data directory create db directory
      5. go to bin in mongoDB
      6. and start mongod file means double click to start
      7. successfull to mongoDB installation

      8. you can download GUI tool for mongoDB commincation
      and connect

  5. Pretty great post. I simply stumbled upon your blog and wished to say that I’ve truly enjoyed browsing your blog posts. After all I’ll be subscribing to your feed and I am hoping you write again very soon!

  6. E:\MEAN\Example5>node app
    Failed to load c++ bson extension, using pure JS version
    connect.multipart() will be removed in connect 3.0
    visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
    connect.limit() will be removed in connect 3.0
    connect.multipart() will be removed in connect 3.0
    visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
    connect.limit() will be removed in connect 3.0
    Listening to port 8080

    signup or login is not work. so i am not run full project .
    plz give me suggestion .

  7. Excellent goods from you, man. I have understand your stuff prior to and you are just too magnificent. I actually like what you’ve got right here, certainly like what you’re saying and the best way wherein you are saying it. You make it enjoyable and you still take care of to stay it smart. I can’t wait to read much more from you. This is actually a tremendous site.

Comments are closed.