Git Product home page Git Product logo

email-data-mining's Introduction

Email Data Mining

===================

This project showcases the following features/technologies:

  • Connect to an IMAP email provider like gmail and process emails
  • Static HTTP server
  • ES7 Features like async/await
  • Running ES7 without transpilation, natively on NodeJS version > 7.7.0
  • Ava unit tests - async unit tests and synchronous unit tests
  • Code Coverage Report generation using Nyc (Istanbul)
  • Generating JS Docs using jsdoc
  • Gulp
  • Docker
  • Yarn package manager

Prerequisites

  • NodeJS version 7.7.0 or more (needed only for development)
  • Docker version 1.13.0 or more (needed only for running the app in docker container)

Environment Variables

The app takes into account three environment variables:

  • IMAP_USERNAME The email username (mandatory, no defaults)
  • IMAP_PASSWORD The email password (mandatory, no defaults)
  • PORT The port on which the HTTP server runs (defaults to 8080)

Installation & Running

The best way to install and run the app is to use docker

Docker Build

Notice the dot (.) at the end of the docker build command

docker build -t sohail/example:v1 .

Run Docker Container

It is important to run the container in interactive mode, to see the unit test results and the results from the email stats processor.

docker run -it --rm -p 127.0.0.1:8080:8080 -e IMAP_USERNAME=<YOUR_USERNAME> -e IMAP_PASSWORD=<YOUR_USERNAME> sohail/example:v1

NOTE: Remember to replace YOUR_USERNAME and YOUR_USERNAME above with real values.

Once you run the app, you will see the email statistics on console and you can visit http://localhost:8080/ on your browser, to see the code coverage results and source code documentations.

Development & Testing

Alternative to docker is to install NodeJS 7.0.0 or more on your computer and run the application.

Installation

Install Yarn package manager and install project dependencies

npm install -g yarn && yarn

Test and Build Documentation

Run Ava unit tests and generate test coverage reports and source code documentations.

gulp

Running the app

Start the application

cd src/ && node index

email-data-mining's People

Contributors

sohailalam2 avatar

Stargazers

Github Security avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.