added and used https-status module, added missing error checks
added and used https-status module, added missing error checks

iliyan-trifonov/notepads-nodejs-angularjs-mongodb-bootstrap,iliyan-trifonov/notepads-nodejs-angularjs-mongodb-bootstrap