aboutsummaryrefslogtreecommitdiff
path: root/api/routes/getZChain
diff options
context:
space:
mode:
Diffstat (limited to 'api/routes/getZChain')
-rw-r--r--api/routes/getZChain/index.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/api/routes/getZChain/index.js b/api/routes/getZChain/index.js
index 6df2d7f..934b436 100644
--- a/api/routes/getZChain/index.js
+++ b/api/routes/getZChain/index.js
@@ -7,7 +7,8 @@ const { spawn } = require('child_process');
* - A JSON array representing the nodes' arching-kaos-zchain
*
*/
-module.exports = (req, res) => {
+function getZChain(req, res)
+{
const command = spawn("ak", ["zchain", "--crawl"]);
response_string = "";
command.stdout.on("data", data => {
@@ -27,3 +28,5 @@ module.exports = (req, res) => {
console.log(`child process exited with code ${code}`);
});
};
+
+module.exports = getZChain;