updated code for mongoose connect
Added validator logic
Adding validator.js
updated documentation for npm