Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jhthorsen/app-screenorama
Application output to websocket stream
https://github.com/jhthorsen/app-screenorama
Last synced: 27 days ago
JSON representation
Application output to websocket stream
- Host: GitHub
- URL: https://github.com/jhthorsen/app-screenorama
- Owner: jhthorsen
- Created: 2014-01-20T20:43:43.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-08-10T06:20:58.000Z (over 9 years ago)
- Last Synced: 2024-10-16T11:58:32.288Z (3 months ago)
- Language: Perl
- Size: 262 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: Changes
Awesome Lists containing this project
README
NAME
App::screenorama - Application output to websocket streamVERSION
0.06DESCRIPTION
This program allow you to pipe STDOUT and STDERR from a program over a
websocket.Protocol
The data transmitted over the websocket connection is JSON in each
frame:* Startup
{"program":$str,"program_args":...}
Same as "program" and "program_args".
* Output
{"output":$str}
Comes after each time the program emit data. NOTE: There's no
guaranty that it will be emitted on newline.* Exit
{"exit_value":$int,"signal":$int}
The exit value of the application. The websocket will be closed
after you see this.* Error
{"error":$str}
If something goes wrong with the application or other operating
system errors.SYNOPSIS
Server
# let others connect to the running program
$ screenorama daemon --listen http://*:5000 -- 'while sleep 1; do echo "hey!"; done'# pipe the output on incoming request
$ screenorama daemon -- ls -l# Set parameters from config file
$ MOJO_CONFIG=/path/to/config.pl screenorama daemonSupported config/environment variables:
* conduit
See Mojo::IOLoop::ReadWriteFork.
Default value: "pty".
Environment variable: "SCREENORAMA_CONDUIT".
* program
The application to run.
* program_args
The arguments given to "program".
* single
Set this to true if the server should just run one application,
shared between every connection. The default is false, meaning a new
instance of "program" will be started on each request.Environment variable: "SCREENORAMA_SINGLE".
* stdin
Set this to true if the "program" should accept commands from STDIN.
Environment variable: "SCREENORAMA_STDIN".
Client
Connect a browser to or to
see the output.AUTHOR
Jan Henning Thorsen - "[email protected]"