Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Latest commit

 

History

History
137 lines (87 loc) · 4.68 KB

readme.md

File metadata and controls

137 lines (87 loc) · 4.68 KB

Project file structure

NOSQL Databases

The following databases must be started

  • Redis

      $ redis-server
    

    For redis-gui

      $ npm install -g redis-commander
      $ redis-commander
    
  • MongoDB

      $ mongod
    
  • Neo4j

    start the community edition of neo4j

  • Rethinkdb

      $ rethinkdb
    
Optional:

If you don't want to use moneo library and would like to use the mongoconnector and neo4j docmanager. Here is the procedure,

  1. Start the MongoDB with replicate set

     $ mongod --replSet myDevReplSet
    
  2. Then, star the mongo shell in terminal

     $ mongo
     $ rs.initiate()
    
  3. Make sure neo4j is started and then, in terminal

     $ mongo-connector -m localhost:27017 -t http://localhost:7474/db/data -d neo4j_doc_manager
    

    mongo-connector command is explained here,

     -m provides the MongoDB endpoint
     -t specifies the Neo4j endpoint
     -d specifies Neo4j Doc Manager as the doc manager
    

A basic account management system built in Node.js with the following features:

  • New User Account Creation
  • Secure Password Reset via Email
  • Ability to Update / Delete Account
  • Session Tracking for Logged-In Users
  • Local Cookie Storage for Returning Users
  • Blowfish-based Scheme Password Encryption

Node-Login is built on top of the following libraries :

databases
NOSQL database Type Usage in the project
MongoDb Document store Storing Author data and blog tags
Neo4j Graph database Recommending blog tags to authors
Redis Key Value / Tuple Store Storing blog data
Rethinkdb Document store Session storage

Installation & Setup

  1. Install Node.js and MongoDB if you haven't already.

  2. Go into the project folder.

     $ cd project
    
  3. Install the dependencies.

     $ npm install -save
    
  4. In a separate shell start the MongoDB daemon, Redis DB, Neo4j DB.

     $ mongod
    
     $ redis-server
    
     start the community edition of neo4j
    
     $ rethinkdb
    
  5. From within the node-login directory, start the server.

     $ node app
    

    For development use nodemon.

     $nodemon app
    
  6. Open a browser window and navigate to: http://localhost:3000

Password Retrieval

To enable the password retrieval feature it is recommended that you create environment variables for your credentials instead of hard coding them into the email dispatcher module.

To do this on OSX you can simply add them to your .profile or .bashrc file.

export EMAIL_HOST='smtp.gmail.com'
export EMAIL_USER='[email protected]'
export EMAIL_PASS='1234'

node-login

Recomended literature