Pass option to node via guest worker config

50 views
Skip to first unread message

dshym...@vivasg.com

unread,
Jan 22, 2019, 4:28:21 AM1/22/19
to Crossbar
Hello everybody.

Is it possible to send the node argument via config?

CLI usage example
node -r source-map-support/register compiled.js


I tried to pass an argument in the “arguments” in config.json file like this
{
           "type": "guest",
           "executable": "node",
           "arguments": [
               "-r source-map-support/register",
               "./dist/crossbar.js"
           ]

}
But console shows “bad option: -r source-map-support/register” and completely ignores this line.


Is there any workaround or way to solve this problem?


Tobias Oberstein

unread,
Jan 25, 2019, 3:18:22 AM1/25/19
to cross...@googlegroups.com, dshym...@vivasg.com

Hi,

"-r source-map-support/register",

those are 2 arguments, hence try:

"-r", "source-map-support/register",

(the args from the list are _not_ simply concatenated, but provided to the spawned executable via a proper syscall)

sidenote: there are also options to pass stuff as stdin to the executable: https://crossbar.io/docs/Guest-Configuration/

Cheers,

/Tobias

Am 22.01.19 um 10:28 schrieb dshym...@vivasg.com:
--
You received this message because you are subscribed to the Google Groups "Crossbar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crossbario+...@googlegroups.com.
To post to this group, send email to cross...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/crossbario/c7c18c4e-896d-4886-9871-df4bcde75cf3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages