{"id":13425017,"url":"https://github.com/siegerts/drip","last_synced_at":"2025-04-07T07:37:24.912Z","repository":{"id":103210489,"uuid":"207702624","full_name":"siegerts/drip","owner":"siegerts","description":"🚰 Watch and automatically restart Plumber APIs during development.","archived":false,"fork":false,"pushed_at":"2020-04-02T15:49:14.000Z","size":59,"stargazers_count":10,"open_issues_count":4,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-02T12:01:57.615Z","etag":null,"topics":["r","rest-api","rstats"],"latest_commit_sha":null,"homepage":"https://rdrip.netlify.app","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siegerts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-11T02:10:43.000Z","updated_at":"2024-04-03T11:17:16.000Z","dependencies_parsed_at":"2023-06-28T23:45:36.972Z","dependency_job_id":null,"html_url":"https://github.com/siegerts/drip","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siegerts%2Fdrip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siegerts%2Fdrip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siegerts%2Fdrip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siegerts%2Fdrip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siegerts","download_url":"https://codeload.github.com/siegerts/drip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247615030,"owners_count":20967175,"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":["r","rest-api","rstats"],"created_at":"2024-07-31T00:01:02.339Z","updated_at":"2025-04-07T07:37:24.885Z","avatar_url":"https://github.com/siegerts.png","language":"Go","readme":"# Overview\n\n`drip` is an easy-to-use development utility that will monitor your [Plumber](https://www.rplumber.io) applications for any changes in your source and automatically restart your server.\n\n\u003e This project is **under development** and subject to change. All feedback and issues are welcome. 🍻\n\nThe key features of drip are:\n\n- Automatic restarting of Plumber applications on file changes 🚀\n- Distributed as a single binary. Install drip by unzipping it and moving it to a directory included in your system's PATH\n- Ignore specific directories\n- Generate and watch route maps\n\n## Requirements\n\ndrip utilizes [Rscript](https://support.rstudio.com/hc/en-us/articles/218012917-How-to-run-R-scripts-from-the-command-line) to run the Plumber application process. For that reason, R is required for the CLI to correctly execute.\n\n## Download and Install\n\nTo install drip, find the appropriate package for your system and download it from the [download page](https://rdrip.netlify.app/). drip is packaged as a zip archive.\n\nAfter downloading drip, unzip the package. drip runs as a single binary named drip. Make sure that the drip binary is available on the PATH.\n\n## Plumber Application Structure\n\ndrip requires that the Plumber application structure make use of an `entrypoint.R` that references a `plumber.R` app.\n\n```r\n# entrypoint.R\n\nplumber::plumb(\"plumber.R\")$run(\"0.0.0.0\", port=8000)\n```\n\n```r\n# entrypoint.R\n\nlibrary(plumber)\n\npr \u003c- plumb(\"plumber.R\")\n\npr$run(\"0.0.0.0\", port=8000)\n```\n\n# Use\n\n## Command: drip\n\nWatch the current directory for changes using default option flag parameters.\n\n### Usage\n\n- `drip [flags]`\n- `drip [command]`\n\nAvailable Commands:\n\n- `help` Help about any command\n- `routes` Display all routes in your Plumber application\n- `version` Print the version number of drip\n- `watch` Watch the current directory for any changes\n\nFlags:\n\n- `-h`, `--help` help for drip\n\n### Example\n\n```sh\n# cd into project\n$ drip\n\n[project-dir] skipping directory: .Rproj.user\n[project-dir] skipping directory: node_modules\n[project-dir] plumbing...\n[project-dir] running: Rscript /project-dir/entrypoint.r\n[project-dir] watching...\nStarting server to listen on port 8000\n\n[project-dir] modified file: /project-dir/plumber.R\n[project-dir] plumbing...\n[project-dir] running: Rscript /project-dir/entrypoint.r\n[project-dir] watching...\n\nStarting server to listen on port 8000\n\n```\n\n## Command: watch\n\nWatch and rebuild the source if any changes are made across subdirectories\n\n### Usage\n\nUsage: `drip watch [flags]`\n\nThe list of available flags are:\n\n- `-d`, `--dir` (_string_) Source directory to watch\n- `-e`, `--entry` (_string_) Plumber application entrypoint file (default \"`entrypoint.r`\")\n- `-f`, `--filter` (_string_) Filter endpoints by substring match\n- `-h`, `--help` help for watch\n- `--host` (_string_) Display route endpoints with a specific host (default \"127.0.0.1\")\n- `--port` (_int_) Display route endpoints with a specific port (default 8000)\n- `--routes` Display route map alongside file watcher\n- `--showHost` Display absolute route endpoint in output\n- `-s`, `--skip` (_strings_) A comma-separated list of directories to not watch. (default [node_modules,.Rproj.user,.git])\n\n### Examples\n\n```sh\n# cd into project\n$ drip watch  --routes\n\n[project-dir] skipping directory: .Rproj.user\n[project-dir] skipping directory: node_modules\n[project-dir] plumbing...\n[project-dir] running: Rscript /project-dir/entrypoint.r\n[project-dir] routing...\n\n+--------------+----------------------------+---------------+\n| PLUMBER VERB |          ENDPOINT          |    HANDLER    |\n+--------------+----------------------------+---------------+\n| @get         | /echo                      | function      |\n| @get         | /dynamic/\u003cparam1\u003e/\u003cparam2\u003e | function      |\n| @get         | /two                       | function      |\n| @get         | /plot                      | function      |\n| @post        | /sum                       | function      |\n| @get         | /req                       | function      |\n| @assets      | ./files/static             | static assets |\n+--------------+----------------------------+---------------+\n\n[project-dir] watching...\nStarting server to listen on port 8000\n```\n\nOr, display routes with an absolute URI and port.\n\n```sh\n# cd into project\n$ drip watch --routes --showHost --host http://localhost\n\n[project-dir] skipping directory: .Rproj.user\n[project-dir] skipping directory: node_modules\n[project-dir] plumbing...\n[project-dir] running: Rscript /project-dir/entrypoint.r\n[project-dir] routing...\n\n+--------------+-------------------------------------------------+---------------+\n| PLUMBER VERB |                    ENDPOINT                     |    HANDLER    |\n+--------------+-------------------------------------------------+---------------+\n| @get         | http://localhost:8000/echo                      | function      |\n| @get         | http://localhost:8000/dynamic/\u003cparam1\u003e/\u003cparam2\u003e | function      |\n| @get         | http://localhost:8000/plot                      | function      |\n| @post        | http://localhost:8000/sum                       | function      |\n| @get         | http://localhost:8000/req                       | function      |\n| @assets      | http://localhost:8000/files/static              | static assets |\n+--------------+-------------------------------------------------+---------------+\n\n[project-dir] watching...\nStarting server to listen on port 8000\n```\n\n## Command: routes\n\nA quick way to visualize your application's routing structure without starting the watcher\n\n### Usage\n\nUsage: `drip routes [flags]`\n\n- `-e`, `--entry` (_string_) Plumber application entrypoint file (default \"entrypoint.r\")\n- `-h`, `--help` help for routes\n\n### Examples\n\n```sh\n$ drip routes\n```\n\n## Command: completion\n\nGenerate `bash` completion commands for drip\n\n### Usage\n\nUsage: `drip completion [flags]`\n\n- `-h`, `--help` help for completion\n\n# Developing and Contribution\n\nIf you want to work on drip, you'll first need [Go](https://golang.org/) installed on your machine.\n\nFor local development, first make sure Go is properly installed and that a GOPATH has been set. You will also need to add $GOPATH/bin to your $PATH.\n\nNext, using Git, clone this repository into \\$GOPATH/src/github.com/siegerts/drip.\n\n```sh\n$ git clone github.com/siegerts/drip\n```\n\n```sh\n$ go build -o build/drip  github.com/siegerts/drip\n$ go install github.com/siegerts/drip\n```\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiegerts%2Fdrip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiegerts%2Fdrip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiegerts%2Fdrip/lists"}