Nodejs-Emails: An app that gets data from the database Couchdb and sends an email to the provided address
To get started you need nodejs and npm installed in your local machine. to install node follow: Nodejs. npm (node package manager) is installed once the node have been installed
You need a config file, a json file that holds the database credetials and the email credetials. For a config file, create a folder
config
on the root project and create a filecpnfig.json
in the folder
example:
{
"couchdb": {
"serverUrl": "https://couch.example.com",
"dbname": "databaseName",
"username": "dbUsername",
"password": "dbPassword"
},
"email": {
"host": "smtp.gmail.com",
"port": 465,
"secure": true,
"emailid": "example@gmail.com",
"password": "password",
"from": "example@gmail.com",
"to": "receiver@gmail.com"
}
}
Clone this repo into new project folder.
git clone https://github.com/Delink-D/nodeemails.git
cd nodeemails
Install the npm packages described in the package.json
and verify that it works:
npm install
Run node app.js
for a server.
You may wish to user other server starts line nodemon
which you have to install.
once the server runs the sending of emails should be executed.
About Nodemailer and how to use Nodemailer
About nodejs nodejs
Getting started with Pouchdb pouchdb
Nano documentation couchdb-nano