This is a simple, single-endpoint API that sends email using Mailgun. Built with Feathers.
- Clone this repo
- Run
npm install
/yarn install
- Set the
MAILGUN_DOMAIN
andMAILGUN_API_KEY
environment variables - Set the
CORS_ORIGIN
environment variable - Run
npm run start
Send a POST
request to http://localhost/emails
with data as follows:
let data = {
to: '[email protected]',
from: '[email protected]',
subject: 'The email subject',
html: '<p>The email HTML content</p>'
}
Run npm run test
(see src/test/app.test.js
)
This project uses Feathers. An open source web framework for building modern real-time applications.
Getting up and running is as easy as 1, 2, 3.
-
Install your dependencies
cd path/to/feathers-mailer; npm install
-
Start your app
npm start
Simply run npm test
and all your tests in the test/
directory will be run.
Feathers has a powerful command line interface. Here are a few things it can do:
$ npm install -g feathers-cli # Install Feathers CLI
$ feathers generate service # Generate a new Service
$ feathers generate hook # Generate a new Hook
$ feathers generate model # Generate a new Model
$ feathers help # Show all commands
For more information on all the things you can do with Feathers visit docs.feathersjs.com.
0.1.0
- Initial release
Copyright (c) 2016
Licensed under the MIT license.