forked from madhums/node-express-mongoose-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
412 additions
and
413 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"extends": "eslint:recommended", | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"mocha": true | ||
}, | ||
"parser": "babel-eslint", | ||
"rules": { | ||
"strict": [2, "global"], | ||
"quotes": [2, "single", "avoid-escape"], | ||
"semi": [2, "always"], | ||
"space-before-function-paren": [2, "always"], | ||
"no-console": 0 | ||
}, | ||
"globals": { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,5 @@ services: | |
- mongodb | ||
language: node_js | ||
node_js: | ||
- "0.12" | ||
- "0.11" | ||
- "0.10" | ||
- "iojs" | ||
- "4.2.2" | ||
- "5.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
'use strict'; | ||
|
||
/** | ||
* Module dependencies. | ||
*/ | ||
|
||
var mongoose = require('mongoose'); | ||
var Notifier = require('notifier'); | ||
var config = require('config'); | ||
const Notifier = require('notifier'); | ||
const swig = require('swig'); | ||
const config = require('config'); | ||
|
||
/** | ||
* Process the templates using swig - refer to notifier#processTemplate method | ||
|
@@ -17,7 +18,6 @@ var config = require('config'); | |
*/ | ||
|
||
Notifier.prototype.processTemplate = function (tplPath, locals) { | ||
var swig = require('swig'); | ||
locals.filename = tplPath; | ||
return swig.renderFile(tplPath, locals); | ||
}; | ||
|
@@ -37,12 +37,12 @@ module.exports = { | |
*/ | ||
|
||
comment: function (options, cb) { | ||
var article = options.article; | ||
var author = article.user; | ||
var user = options.currentUser; | ||
var notifier = new Notifier(config.notifier); | ||
const article = options.article; | ||
const author = article.user; | ||
const user = options.currentUser; | ||
const notifier = new Notifier(config.notifier); | ||
|
||
var obj = { | ||
const obj = { | ||
to: author.email, | ||
from: '[email protected]', | ||
subject: user.name + ' added a comment on your article ' + article.title, | ||
|
Oops, something went wrong.