Skip to content

Instantly share code, notes, and snippets.

View ADelRosarioH's full-sized avatar
:octocat:

Anthony Del Rosario ADelRosarioH

:octocat:
View GitHub Profile
@ADelRosarioH
ADelRosarioH / .npmrc
Created September 3, 2018 15:28 — forked from ikaruce/.npmrc
.npmrc( proxy and strict-ssl setting )
proxy http://{proxy_server}:{proxy_port}
https-proxy http://{proxy_server}:{proxy_port}
strict-ssl=false
/**
* Created with JetBrains WebStorm.
* User: ynonperek
* Date: 1/28/13
* Time: 9:14 PM
*
* Mongoose plugin that adds a hashed password field
*/
var bcrypt = require('bcrypt');
// lastMod.js
module.exports = exports = function lastModifiedPlugin (schema, options) {
schema.add({ lastMod: Date })
schema.pre('save', function (next) {
this.lastMod = new Date
next()
})
if (options && options.index) {