{"id":19627312,"url":"https://github.com/rob-murray/ferver","last_synced_at":"2025-04-28T05:34:50.825Z","repository":{"id":4609156,"uuid":"5752593","full_name":"rob-murray/ferver","owner":"rob-murray","description":"A Ruby gem to serve files over HTTP, packaged as a Ruby gem","archived":false,"fork":false,"pushed_at":"2021-01-09T20:15:54.000Z","size":116,"stargazers_count":14,"open_issues_count":6,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-04T14:37:48.571Z","etag":null,"topics":["ruby","webserver"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/rob-murray.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}},"created_at":"2012-09-10T16:52:57.000Z","updated_at":"2018-06-21T20:16:16.000Z","dependencies_parsed_at":"2022-09-09T00:52:39.000Z","dependency_job_id":null,"html_url":"https://github.com/rob-murray/ferver","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rob-murray%2Fferver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rob-murray%2Fferver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rob-murray%2Fferver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rob-murray%2Fferver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rob-murray","download_url":"https://codeload.github.com/rob-murray/ferver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223842208,"owners_count":17212318,"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":["ruby","webserver"],"created_at":"2024-11-11T11:49:09.892Z","updated_at":"2024-11-11T11:49:10.691Z","avatar_url":"https://github.com/rob-murray.png","language":"Ruby","readme":"## Ferver = File-Server\n\n#### Ferver: A simple web app to serve files over HTTP packaged as a Ruby gem.\n\n[![Build Status](https://travis-ci.org/rob-murray/ferver.svg?branch=master)](https://travis-ci.org/rob-murray/ferver)\n[![Code Climate](https://codeclimate.com/github/rob-murray/ferver.png)](https://codeclimate.com/github/rob-murray/ferver)\n[![Coverage Status](https://coveralls.io/repos/rob-murray/ferver/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/rob-murray/ferver?branch=master)\n[![Gem Version](https://badge.fury.io/rb/ferver.svg)](http://badge.fury.io/rb/ferver)\n\n### Description\n\nThis is super, simple ruby gem to serve files over **http**, useful as a basic file server to quickly share files on your local network or something over the web. Just install the gem and go!\n\nHere's the spec for **ferver**:\n\n* available over http\n* provide a list of files as html and json\n* ignore directories\n* ignore dotfiles - turn off with setting\n* serve files as individual files\n* minimal config\n* able to specify the directory to serve files from\n\n### Getting started\n\nUsing **ferver** could not be simpler - just install the **ferver** gem.\n\n```bash\n$ gem install ferver\n```\n\n### Usage\n\nYou can run **ferver** from any directory, just pass in the directory you want to serve files from as a command line argument or leave blank to use the current directory.\n\n##### Use the current directory\n\n```bash\n$ ferver\n````\n\n##### Use a specific directory\n\nFor example, to serve files from **/Users/rob/Projects/ferver/** directory pass the path in as below using the `--directory` option.\n\n```bash\n$ ferver -d /Users/rob/Projects/ferver/\n````\n\n##### Serve all files\n\nBy default, dotfiles will be hidden. Use the `--all` option to serve all files.\n\n```bash\n$ ferver -a\n````\n\n\u003e Note that zero size files will always be hidden.\n\n##### Configure webserver\n\nIf required, you can configure the bind address or port number used by the webserver. By default this is `0.0.0.0` and port `4567` which means the server is accessible from outside your machine (if firewall permits). For example if you used the configuration below then it would only be accessible from local machine and on port `9999`.\n\n```bash\n$ ferver -p 9999 -b 127.0.0.1\n````\n\n##### Command line help\n\nFor a list of arguments just use the `--help` switch.\n\n```bash\n$ ferver -h\n````\n\n### Accessing files\n\nThe **ferver** gem uses [Sinatra](http://www.sinatrarb.com/) and runs on default port configuration so just point your browser to `http://localhost:4567` to list the files.\n\n\u003e If you are unable to connect then please check any firewall settings or the configured bind address or port number!\n\n#### HTML\n\nList available files in your browser.\n\n`http://localhost:4567/files`\n\n#### JSON\n\nRequesting content-type `json`, for example passing the header `Accept: application/json` will return the list of files as json.\n\n```bash\ncurl -i -H \"Accept: application/json\" http://localhost:4567/files\n```\n\n#### Download a file\n\nFiles are available via their zero based index in the list, e.g. `http://localhost:4567/files/:id`\n\nFor example to download file appearing third in the list displayed earlier, request `http://localhost:4567/files/2`\n\n### Contributions\n\nPlease use the GitHub pull-request mechanism to submit contributions.\n\nAfter cloning the repo, you can run the web application without having to publish and then install the gem package by calling the executable as per normal.\n\n\n### License\n\nThis project is available for use under the MIT software license.\nSee LICENSE\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frob-murray%2Fferver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frob-murray%2Fferver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frob-murray%2Fferver/lists"}