小编D_E*_*det的帖子

域驱动设计中实体与聚合之间的差异

请问域驱动设计中实体和聚合根源之间的主要区别是什么.例如,在实体框架中,如果我可以确保数据完整性实体,那么聚合的用途是什么?

c# design-patterns domain-driven-design

9
推荐指数
3
解决办法
8641
查看次数

使用有角度的2应用程序从Cloud Functions for Firebase发送邮件电子邮件

我正在尝试使用来自firebase云功能的Mailgun的api发送电子邮件.我已经尝试在Cloud Function中实现了相同的nodejs教程,但我总是得到"错误:无法处理请求".请问我做错了什么.

云功能代码如下:

 <pre>
  <code>
 var functions = require('firebase-functions');

 var nodemailer = require('nodemailer');

  var auth = {
  auth: {
      api_key: '###################',
       domain: 's###############g'
   }
 }
 exports.helloWorld = functions.https.onRequest((request, response) => {
  response.send("Hello from Firebase!");
  });

   var nodemailerMailgun = nodemailer.createTransport(auth);

 exports.sendEmail = functions.https.onRequest((request, response) =>{
  //app.get('/', function(req, res) {
   test();
 });

  function test(){
     const mailOptions = {
        //Specify email data
            from: "info@xyz.com",
            //The email to contact
        to: "xyz@yahoo.com",
        //Subject and text data  
        subject: 'Hello from Mailgun',
        text: 'Hello, This is not …
Run Code Online (Sandbox Code Playgroud)

node.js firebase mailgun google-cloud-functions angular

7
推荐指数
1
解决办法
4021
查看次数