Git Product home page Git Product logo

email-service's Introduction

Email Service

Backend Track

I decided to write a general endpoint for SendGrid and MailGun.

If the application fails to send a request to the chosen provider it will try to use the other one.

To set the primary provider for your request please use the provider field in the json request.

Be sure to set all fields in the json request, there is no optional field.

Examples for using the corresponding APIs:

Version: 0.0.1

How to build, test and run with gradle

edit src/resources/application.properties (required to run tests)

MAILGUN_API_KEY=yourKey
MAILGUN_DOMAIN=yourDomain
SENDGRID_API_KEY=yourKey

build

./gradlew build

test

DISCLAIMER: the tests need the properties from application.properties

./gradlew test

run

./gradlew bootRun

How to build and run the Dockerimage

build Dockerimage

docker build --build-arg JAR_FILE=build/libs/emailservice-0.0.1-SNAPSHOT.jar -t  email-service .

run Dockerimage

docker run -p 8080:8080 email-service 

How to access and test the documentation

read api documentation in json:

http://127.0.0.1:8080/v3/api-docs

read api documentation in yaml:

http://127.0.0.1:8080/v3/api-docs.yaml 

read and test swagger-ui documentation:

http://127.0.0.1:8080/swagger-ui/index.html

email-service's People

Contributors

twain78 avatar

Watchers

 avatar  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.