From cde58c21a4b9bfb8393cb76852682fc521dc4c72 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Thu, 4 Jul 2024 14:30:12 +0900 Subject: [PATCH] Update catproxy.js --- lib/catproxy.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/catproxy.js b/lib/catproxy.js index 784212c..9919aac 100644 --- a/lib/catproxy.js +++ b/lib/catproxy.js @@ -1,11 +1,13 @@ // catproxy.js // Caterpillar Proxy Integration for WelsonJS framework // https://github.com/gnh1201/welsonjs -// https://github.com/gnh1201/caterpillar var JSONRPC2 = require("lib/jsonrpc2"); function CatProxyClient(url) { - var env = {"target": url, "method": ""}; + var env = { + "target": "http://localhost:5555/jsonrpc2", // Check this: https://github.com/gnh1201/caterpillar + "method": "" + }; this.set_env = function(k, v) { env[k] = v || null; @@ -54,6 +56,10 @@ function CatProxyClient(url) { return result; } + + if (typeof url !== "undefined") { + this.set_env(url); + } } function create(url) { @@ -63,7 +69,7 @@ function create(url) { exports.create = create; exports.CatProxyClient = CatProxyClient; -exports.VERSIONINFO = "Caterpillar Proxy Integration (caterpillar.js) version 0.1.3"; +exports.VERSIONINFO = "Caterpillar Proxy Integration (caterpillar.js) version 0.1.4"; exports.AUTHOR = "abuse@catswords.net"; exports.global = global; exports.require = global.require;