From 1921da3a41871900a32d30404f423d6083b9801d Mon Sep 17 00:00:00 2001 From: arshiam2 <arshiam2@illinois.edu> Date: Sat, 1 Dec 2018 21:38:05 -0600 Subject: [PATCH] update --- cli/src/commands/put-stream.js | 4 ++-- sfds/index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/src/commands/put-stream.js b/cli/src/commands/put-stream.js index c13e48f..db7b6c5 100644 --- a/cli/src/commands/put-stream.js +++ b/cli/src/commands/put-stream.js @@ -12,7 +12,7 @@ const fetch = require("node-fetch"); const handleErrors = require("../utils/handleErrors"); const getMaster = require("../utils/getMaster"); -module.exports.command = "put-stream"; +module.exports.command = "put-stream [name]"; module.exports.describe = "Writes localfilename to the SDFS as sdfsfilename."; module.exports.builder = (yargs: any) => yargs; @@ -62,7 +62,7 @@ module.exports.handler = handleErrors(async (argv: {}) => { setInterval(function sync() { if (queue.length > 0) { const body = queue.pop(); - var target = "http://"+ master + ":3000/spout/"; + var target = "http://"+ master + ":3000/spout/" + argv.name; console.log(target) console.log(JSON.stringify(body)) fetch(target, { diff --git a/sfds/index.js b/sfds/index.js index 2ecf297..32807fd 100644 --- a/sfds/index.js +++ b/sfds/index.js @@ -406,8 +406,8 @@ app.post("/bolt", function(req, res) { res.send(resolver(req.body)); }); -app.post("/spout", function(req, res) { - // console.log(req.body); +app.post("/spout/:name", function(req, res) { + console.log(req.params.name); queue.push(req.body) // console.log(queue.length) res.send("got it"); -- GitLab