{"id":1996,"date":"2022-04-21T08:51:35","date_gmt":"2022-04-20T23:51:35","guid":{"rendered":"https:\/\/blog.wsd.sh\/?p=1996"},"modified":"2022-04-22T10:01:56","modified_gmt":"2022-04-22T01:01:56","slug":"nodejs-event-and-function-flow-%e3%81%ae%e8%a8%98%e8%bf%b0%e6%96%b9%e5%bc%8f%e3%82%92%e5%ae%9a%e7%be%a9","status":"publish","type":"post","link":"https:\/\/blog.wsd.sh\/?p=1996","title":{"rendered":"<small>nodejs : Define the description method of Event and function flow<\/small>"},"content":{"rendered":"<p>\uff11\uff0ePurpose<br \/>\n\u30fb Define the description method of Event and function flow.<\/p>\n<p>\uff12\uff0eDirectories and files<\/p>\n<pre>\r\n-+- index.js\r\n |\r\n +- app\r\n |  |- ActionWidget.js\r\n |\r\n +- routes\r\n    |- client_invoice.js\r\n    |- client_to_supplier.js\r\n    |- supplier_message.js\r\n    |- invoice_sub.js\r\n    |- database.js\r\n<\/pre>\n<p>\uff13\uff0eExample<br \/>\n(1) [ Make Payment ]<\/p>\n<pre>\r\nbutton:{\r\n  [ Make Payment ]\r\n}\r\nflow:{\r\n  (e) evt_handleInvoiceMakePayment =function: this.DOM.modal.body.classList.add   \r\n     === dialogue window =button: [ Make payment ]\r\n  (e) evt_handleModalSubmitClick =url: \/api\/invoice\/makePayment\r\n  >>> {\/api\/invoice}\/makePayment =function: to_supplier.makePayment\r\n     --> supplier_makePayment () {\r\n        ${supplier_host} = sub.getSupplierHost \r\n           --> api_setMakePayment =function: db.query\r\n        =url: ${supplier_host}\/api\/message\/supplierToMakePayment\r\n     }\r\n  >>> {\/api\/message}\/supplierToMakePayment =function: sub.setMakePayment\r\n     --> api_setMakePayment =function: db.update\r\n}\r\nfiles:{\r\n  evt_handleInvoiceMakePayment @ .\/app\/ActionWidget.js\r\n  evt_handleModalSubmitClick   @ .\/app\/ActionWidget.js\r\n  \/api\/invoice\/makePayment     @ .\/app\/ActionWidget.js\r\n  {\/api\/invoice}               @ .\/index.js\r\n  \/api\/invoice                 = require('.\/client_invoice.js')\r\n  \/makePayment                 @ .\/routes\/client_invoice.js\r\n  supplier_makePayment         @ .\/routes\/client_to_supplier.js\r\n  ${\/api\/message}              @ .\/index.js\r\n  \/api\/message                 @ require('.\/supplier_message.js')\r\n  supplierToMakePayment        @ .\/routes\/supplier_message.js\r\n  sub                          = require(\".\/invoice_sub.js\")\r\n  api_getSupplierHost          @ .\/routes\/invoice_sub.js\r\n  api_setMakePayment           @ .\/routes\/invoice_sub.js\r\n  db                           = require(\".\/database.js\")\r\n  db_query                     @ .\/routes\/database.js\r\n  db_update                    @ .\/routes\/database.js\r\n}\r\n<\/pre>\n<p>\uff14\uff0eDescription method<br \/>\nmaking&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uff11\uff0ePurpose \u30fb Define the description method of Event and function flow. \uff12\uff0eDirectories and files -+- index.js | +&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts\/1996"}],"collection":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1996"}],"version-history":[{"count":35,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts\/1996\/revisions"}],"predecessor-version":[{"id":2072,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts\/1996\/revisions\/2072"}],"wp:attachment":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1996"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}