{"id":21612260,"url":"https://github.com/anapsix/simple_api","last_synced_at":"2025-04-11T05:35:37.280Z","repository":{"id":10442317,"uuid":"12609086","full_name":"anapsix/simple_api","owner":"anapsix","description":"Simple API example with Sinatra, Puma/Thin/Unicorn, init script, Docker and super-duper self-install script.","archived":false,"fork":false,"pushed_at":"2023-08-19T00:55:44.000Z","size":2196,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-02T00:39:09.226Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anapsix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-05T04:12:01.000Z","updated_at":"2024-05-02T00:39:09.227Z","dependencies_parsed_at":"2022-07-30T11:38:07.979Z","dependency_job_id":null,"html_url":"https://github.com/anapsix/simple_api","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/anapsix%2Fsimple_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anapsix%2Fsimple_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anapsix%2Fsimple_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anapsix%2Fsimple_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anapsix","download_url":"https://codeload.github.com/anapsix/simple_api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226233479,"owners_count":17592894,"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-11-24T21:17:39.445Z","updated_at":"2024-11-24T21:17:40.065Z","avatar_url":"https://github.com/anapsix.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple API Server in Ruby with Sinatra and Thin/Unicorn.\nSimple API example with Ruby's Sinatra, Thin/Unicorn, init script, Docker and super-duper self-install script.\n## Requirements\n * ruby1.9.x\n  + bundler\n    - sinatra\n    - thin / unicorn / puma\n\n## Optional Requirements\n * lxc container support\n * linux kernel 3.8+ with aufs (3.2 from squeeze-backports, or default wheezy kernel will do)\n\n## Installing dependencies\n    sudo apt-get install ruby1.9.1 ruby1.9.1-dev build-essential\n    sudo gem install bundle\nThen \"cd\" into where you checked-out code and run `bundle install`. \nAdditional dependencies can be installed via \"apt-get\" (if available) or \"gem\"\n\n## Starting/Stopping API Server via INIT script\n  you can change API port and service name in simple\\_api.init and simple\\_api.default:\n\n     NAME=\"simple_api\"\n     LISTEN_IP=\"0.0.0.0\"  # listen IP, default is 127.0.0.1\n     LISTEN_PORT=8888     # listen port, if unset defaults to random in 8000-9000 range\n     SERVER=\"thin\"        # thin, unicorn or puma are supported\n\n  start it with\n\n    ./simple_api.init start\n\n  stop it with\n\n    ./simple_api.init stop\n\n## Accessing API via WebBrowser or CURL\n  when running on your local machine use the following URL\n\n    http://localhost:8888\n\n  replace _\"localhost\"_ with IP/hostname of the machine you've started the service on\n\n## Starting/Stopping UNICORN manually\n    export PATH=$PATH:/var/lib/gems/1.9.1/bin\n    unicorn -E development -l 0.0.0.0:8888\n\n  you can have Unicorn daemonize itself with _\"-D\"_ flag\n\n      unicorn -E development -D -l 0.0.0.0:8888\n\n  to stop your instance either use _pkill_ or use [CRTL-C] when it's running in foreground\n\n    pkill unicorn\n\n  for examples of starting other server hadnlers (thin, puma), see simple\\_api.init source.. \n\n## Linux Containers and Docker\n  you can launch your API Server in a LXC with Docker\n  check out _.docker/engage.sh_\n\n    ./engage.sh [start|stop|restart|status]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanapsix%2Fsimple_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanapsix%2Fsimple_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanapsix%2Fsimple_api/lists"}