Sign inSign up

cabsolutely/api2-emailservice

By cabsolutely

Updated almost 10 years ago

This is an email service for Cabsolutely API2.0

Image
0

829

cabsolutely/api2-emailservice repository overview

EmailService

Email service for Cabsolutely API 2.0 - created with Odin

Running the process

make start

This starts your application on port 9000.

Usage

To use this service, you will need Befrost. Here is an example:

var Befrost = require('befrost');

var config = {
    serviceName: 'email-service',
    hostPortList: ['127.0.0.1:21300'],
    timeout: 5000,
    secretKey: 'secret_key',
};

var client = Befrost(config, onConnected);

function onConnected(err, service) {
    if (err) {
        // Handle error
        return;
    }
    
    var email = {
    	to: '[email protected]',
    	from: '[email protected]',
    	subject: 'Test',
    	message: 'Test message'
    };
    service.send({
    	email: email
    }, function onResult(error, res) {
    	if (error) {
	        // Handle error
	        return;
	    }
	    console.log(res);
    });
}

NPM scripts

  • npm test This will run the tests.
  • npm run view-cover This will show code coverage in a browser

Contributors

  • Balazs Fabian

Tag summary

Content type

Image

Digest

Size

280.6 MB

Last updated

almost 10 years ago

docker pull cabsolutely/api2-emailservice