command line options when starting crossbar

#1

Is it possible to pass in a user command line option when starting crossbar, such as crossbar start MYOPTION and have the ability to read MYOPTION during runtime?
If so, can someone point me to the documentation?

I have an application that communicates with Arduino’s over serial. I can hardcode the serial port (/dev/ttyACM0) and that works fine for my configuration, but is there a mechanism whereby a user can provide their specific port designator before starting up crossbar?

0 Likes

#2

Hi Alan,

Is it possible to pass in a user command line option when starting
crossbar, such as crossbar start MYOPTION and have the ability to read
MYOPTION during runtime?
If so, can someone point me to the documentation?

I have an application that communicates with Arduino's over serial. I
can hardcode the serial port (/dev/ttyACM0) and that works fine for my
configuration, but is there a mechanism whereby a user can provide their
specific port designator before starting up crossbar?

Not from environment variables.

What you can do is provide custom configuration to app components started from Crossbar.io via node configuration

https://github.com/crossbario/crossbarexamples/blob/master/pg/publisher/.crossbar/config.json#L66

This is for Python components (running in a worker of type "router" or "container"). A similar thing exist for workers of type "guest". In this case, custom configuration parts are serialized to JSON and provided to the worker on stdin.

Cheers,
/Tobias

···

Am 17.03.2015 um 20:05 schrieb Alan Yorinks:

--
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
<mailto:crossbario+...@googlegroups.com>.
To post to this group, send email to cross...@googlegroups.com
<mailto:cross...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/crossbario/7ce97cfd-53b9-43d4-8b56-c84e289a857c%40googlegroups.com
<https://groups.google.com/d/msgid/crossbario/7ce97cfd-53b9-43d4-8b56-c84e289a857c%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

0 Likes

#3

Tobias,
Thanks for the quick answer. What I may need to do in the future is provide a script that will allow the user to enter command line options, and then have the script modify config.json “extras” before starting crossbar. My application is probably outside of the realm of intended use for crossbar, so I apologize for these “weird” questions.

Alan

···

On Tuesday, March 17, 2015 at 3:05:57 PM UTC-4, Alan Yorinks wrote:

Is it possible to pass in a user command line option when starting crossbar, such as crossbar start MYOPTION and have the ability to read MYOPTION during runtime?
If so, can someone point me to the documentation?

I have an application that communicates with Arduino’s over serial. I can hardcode the serial port (/dev/ttyACM0) and that works fine for my configuration, but is there a mechanism whereby a user can provide their specific port designator before starting up crossbar?

0 Likes