I have an erlang app with a web frontend. Right now, if you want to talk to it via the shell, you have to do it from the command line. This app will be running on multiple platforms and in environments where the administrator may not be very command-line savvy, but for tech support purposes I'd like to be able to have them bring up a shell in their browser and be able to inspect the state of the node from that.
Has someone already implemented such a thing? It would need to support Windows, Red Hat, and OS X, as well as major browsers. Something that looked a lot like the shell and supported the same commands would be best.
On a Unix system you enter the command erl at the operating system prompt. This command starts the Erlang runtime system and the Erlang shell. On the Windows platform you normally start Erlang/OTP from the start menu. You can also enter the command erl or werl from a DOS box or Command box.
If you want to experiment with records at the command line, you'll have to use a shell command. Let's try that in the erlang shell tool, erl . And then you can declare a record the same way you would in Erlang. And to inspect that variable in erl, just declare the variable and put a .
JCL mode Once there you can use the command q to quit the Erlang shell. This is similar in effect to erlang:halt(0).
Syntax − f(x). Where, x – is the variable for which the binding needs to be removed. For example − Following is an example of how the function is used. First a variable called Str and Str1 are defined.
A possibility could be to use a web based terminal such as AjaxTerm and to set the Erlang shell as the default shell for the web user. For example, in a UNIX system, this could be done by setting the proper value in the /etc/passwd file.
Obviously, we're considering here a secure environment, in which access is not provided to any malicious user and the nodes are not accessible from the outside world.
I've just run into the erlwsh project. Does exactly what you need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With