Skip to content

Commit

Permalink
console colors & package update
Browse files Browse the repository at this point in the history
  • Loading branch information
GiorgiMakh committed Jan 4, 2024
1 parent 19b2750 commit fe5fc64
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 28 deletions.
24 changes: 0 additions & 24 deletions .gitignore

This file was deleted.

4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const nodemailer = require('nodemailer');

function erroremail(service, email, pass, toemail=email) {
if(!service||!email||!pass) throw new Error('Errormail: Not Valid Parameters');
if(!service||!email||!pass) throw new Error('erroremail: not valid parameters');

const transporter = nodemailer.createTransport({
service: service,
Expand Down Expand Up @@ -96,7 +96,7 @@ function erroremail(service, email, pass, toemail=email) {
console.log(error);
next(error);
} else {
console.log('Error email sent: ' + info.response);
console.log('\x1b[31merror email\x1b[0m sent: ' + info.response);
}
});
}
Expand Down
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "erroremail",
"version": "0.0.3",
"version": "0.0.4",
"description": "Express middleware which logs error and send to email",
"main": "index.js",
"scripts": {
Expand All @@ -27,5 +27,13 @@
"bugs": {
"url": "https://github.com/GiorgiMakh/erroremail/issues"
},
"homepage": "https://github.com/GiorgiMakh/erroremail#readme"
"homepage": "https://github.com/GiorgiMakh/erroremail#readme",
"files": [
"LICENSE",
"README.md",
"index.js"
],
"engines": {
"node": ">= 6.0.0"
}
}

0 comments on commit fe5fc64

Please sign in to comment.