Code Monkey home page Code Monkey logo

node-authentication-passport's Introduction

node-authentication-passport

This repository contains a simple demo of Authentication with username and password. User needs to supply username and password and if the credentials are correct then user will be redirected to the success page else error page

Please make sure you have installed following items inorder to use the demo.

  • nodejs
  • passportjs
  • expressjs
  • MongoDB server

Get MongoDB server by the steps below:

--Installation--

  • sudo apt update
  • sudo apt install -y mongodb

-- Check the service and database --

  • sudo systemctl status mongodb

-- Check connection status --

  • mongo --eval 'db.runCommand({ connectionStatus: 1 })'

-- Workig with MongoDB --

  • Start server : sudo mongod
  • Start MongohShell in another terminal : mongo
  • Create db and add some data in mongo shell as follow:
    • use MyDatabase;
    • db.userInfo.insert({'username':'admin','password':'admin'});

After successful completion, please try to run the index.js on node server and you'll get the html file on specified port. Use credentials as we stored in db in order to work with it.

Don't forget to Star and Fork the repo. :)

node-authentication-passport's People

Contributors

juhilsomaiya avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.