{"id":13508679,"url":"https://github.com/hassox/std_json_io","last_synced_at":"2025-03-22T06:31:09.293Z","repository":{"id":66317940,"uuid":"48868826","full_name":"hassox/std_json_io","owner":"hassox","description":"A simple library for Elixir that provides json over STDIO","archived":false,"fork":false,"pushed_at":"2020-03-03T21:40:09.000Z","size":11,"stargazers_count":30,"open_issues_count":11,"forks_count":28,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-01T21:04:14.843Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hassox.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-01-01T03:50:24.000Z","updated_at":"2024-04-12T17:11:23.000Z","dependencies_parsed_at":"2023-07-26T10:53:23.490Z","dependency_job_id":null,"html_url":"https://github.com/hassox/std_json_io","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hassox%2Fstd_json_io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hassox%2Fstd_json_io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hassox%2Fstd_json_io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hassox%2Fstd_json_io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hassox","download_url":"https://codeload.github.com/hassox/std_json_io/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244918500,"owners_count":20531682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T02:00:56.909Z","updated_at":"2025-03-22T06:31:08.547Z","avatar_url":"https://github.com/hassox.png","language":"Elixir","funding_links":[],"categories":["Miscellaneous","Elixir"],"sub_categories":[],"readme":"# StdJsonIo\n\nStarts a pool of workers that communicate with an external script via JSON over\nSTDIN/STDOUT.\n\nOriginally written to use [react-stdio](https://github.com/mjackson/react-stdio)\nbut can be used with any process that reads a JSON object from STDIN and outputs\nJSON on STDOUT.\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed as:\n\n  1. Add `std_json_io` to your list of dependencies in `mix.exs`:\n\n        def deps do\n          [{:std_json_io, \"~\u003e 0.1.0\"}]\n        end\n\n  2. Ensure `std_json_io` is started before your application:\n\n        def application do\n          [applications: [:std_json_io]]\n        end\n\n### Setup\n\nDefine a module and use StdJsonIo.\n\n```elixir\ndefmodule MyApp.ReactIo do\n  use StdJsonIo, otp_app: :my_app\nend\n```\n\nWhen you use `StdJsonIo` your module becomes a supervisor. You'll need to add it\nto your supervision tree.\n\n```elixir\nchildren = [\n  # snip\n  supervisor(MyApp.ReactIo, [])\n]\n\nopts = [strategy: :one_for_one, name: MyApp]\n\nSupervisor.start_link(children, opts)\n```\n\n\n### Configuration\n\nYou can either configure as additional arguments of the use statement, or in your config file.\n\n```elixir\nconfig :my_app, MyApp.ReactIo,\n  pool_size: 20, # default 5\n  max_overflow: 10, # default 10\n  script: \"path/to/script\", # for react-io use \"react-stdio\"\n  watch_files: [\n    Path.join([__DIR__, \"../priv/server/js/component.js\"]) # do not watch files in dev\n  ]\n```\n\n* `script` - the script to run for the IO server\n* `watch_files` - A list of files to watch for changes. When the file changes,\n  kill the IO worker and restart, picking up any changes. Use only in dev.\n* `pool_size` - The size for the pool of workers - See poolboy `size`\n* `max_overflow` - The poolboy `max_overflow`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhassox%2Fstd_json_io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhassox%2Fstd_json_io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhassox%2Fstd_json_io/lists"}