Add email service and config template
This commit is contained in:
parent
9c67b46f02
commit
4259778224
6745
app/package-lock.json
generated
6745
app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -24,6 +24,7 @@
|
|||||||
"leaflet": "^1.5.1",
|
"leaflet": "^1.5.1",
|
||||||
"mapnik": "^4.2.1",
|
"mapnik": "^4.2.1",
|
||||||
"node-fs": "^0.1.7",
|
"node-fs": "^0.1.7",
|
||||||
|
"nodemailer": "^6.3.0",
|
||||||
"pg-promise": "^8.7.5",
|
"pg-promise": "^8.7.5",
|
||||||
"prop-types": "^15.7.2",
|
"prop-types": "^15.7.2",
|
||||||
"query-string": "^6.8.2",
|
"query-string": "^6.8.2",
|
||||||
@ -39,7 +40,8 @@
|
|||||||
"@types/express": "^4.17.0",
|
"@types/express": "^4.17.0",
|
||||||
"@types/express-session": "^1.15.13",
|
"@types/express-session": "^1.15.13",
|
||||||
"@types/jest": "^24.0.17",
|
"@types/jest": "^24.0.17",
|
||||||
"@types/node": "^12.7.1",
|
"@types/node": "^8.10.52",
|
||||||
|
"@types/nodemailer": "^6.2.1",
|
||||||
"@types/prop-types": "^15.7.1",
|
"@types/prop-types": "^15.7.1",
|
||||||
"@types/react": "^16.9.1",
|
"@types/react": "^16.9.1",
|
||||||
"@types/react-dom": "^16.8.5",
|
"@types/react-dom": "^16.8.5",
|
||||||
|
11
app/src/api/services/email.ts
Normal file
11
app/src/api/services/email.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import * as nodemailer from 'nodemailer';
|
||||||
|
|
||||||
|
export const transporter = nodemailer.createTransport({
|
||||||
|
host: process.env.MAIL_SERVER_HOST,
|
||||||
|
port: parseInt(process.env.MAIL_SERVER_PORT),
|
||||||
|
secure: false,
|
||||||
|
auth: {
|
||||||
|
user: process.env.MAIL_SERVER_USER,
|
||||||
|
pass: process.env.MAIL_SERVER_PASSWORD
|
||||||
|
}
|
||||||
|
});
|
@ -21,7 +21,10 @@ module.exports = {
|
|||||||
PGUSER: "username",
|
PGUSER: "username",
|
||||||
PGPASSWORD: "longrandomsecret",
|
PGPASSWORD: "longrandomsecret",
|
||||||
APP_COOKIE_SECRET: "longrandomsecret",
|
APP_COOKIE_SECRET: "longrandomsecret",
|
||||||
|
MAIL_SERVER_HOST: "mail_hostname",
|
||||||
|
MAIL_SERVER_PORT: 587,
|
||||||
|
MAIL_SERVER_USER: "mail_username",
|
||||||
|
MAIL_SERVER_PASSWORD: "longrandompassword",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -17,7 +17,11 @@ module.exports = {
|
|||||||
PGUSER: "username",
|
PGUSER: "username",
|
||||||
PGPASSWORD: "longrandomsecret",
|
PGPASSWORD: "longrandomsecret",
|
||||||
APP_COOKIE_SECRET: "longrandomsecret",
|
APP_COOKIE_SECRET: "longrandomsecret",
|
||||||
TILECACHE_PATH: "/path/to/tile/cache"
|
TILECACHE_PATH: "/path/to/tile/cache",
|
||||||
|
MAIL_SERVER_HOST: "mail_hostname",
|
||||||
|
MAIL_SERVER_PORT: 587,
|
||||||
|
MAIL_SERVER_USER: "mail_username",
|
||||||
|
MAIL_SERVER_PASSWORD: "longrandompassword",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user