{"id":13688403,"url":"https://github.com/rest-go/rest","last_synced_at":"2025-04-04T16:16:02.556Z","repository":{"id":65423924,"uuid":"584257495","full_name":"rest-go/rest","owner":"rest-go","description":"Rest serves a fully RESTful API from any SQL database","archived":false,"fork":false,"pushed_at":"2024-10-31T05:10:16.000Z","size":190,"stargazers_count":116,"open_issues_count":2,"forks_count":10,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-28T15:09:59.770Z","etag":null,"topics":["api-server","automatic-api","database","golang","mysql","no-code","postgres","restful-api","sql","sqlite"],"latest_commit_sha":null,"homepage":"https://rest-go.com","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/rest-go.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-02T02:41:38.000Z","updated_at":"2025-02-08T13:12:40.000Z","dependencies_parsed_at":"2023-11-23T13:40:56.127Z","dependency_job_id":"573283c0-0e05-4c43-9169-cc3c3e8994ae","html_url":"https://github.com/rest-go/rest","commit_stats":{"total_commits":84,"total_committers":3,"mean_commits":28.0,"dds":"0.023809523809523836","last_synced_commit":"5fe86203b113a6bb9f5e592b81ed9915a445b1dc"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rest-go%2Frest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rest-go%2Frest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rest-go%2Frest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rest-go%2Frest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rest-go","download_url":"https://codeload.github.com/rest-go/rest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208181,"owners_count":20901570,"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":["api-server","automatic-api","database","golang","mysql","no-code","postgres","restful-api","sql","sqlite"],"created_at":"2024-08-02T15:01:13.059Z","updated_at":"2025-04-04T16:16:02.531Z","avatar_url":"https://github.com/rest-go.png","language":"Go","readme":"# Rest\n\n![ci](https://github.com/rest-go/rest/actions/workflows/ci.yml/badge.svg)\n[![codecov](https://codecov.io/gh/rest-go/rest/branch/main/graph/badge.svg?token=T38FWXMVY1)](https://codecov.io/gh/rest-go/rest)\n[![docker](https://img.shields.io/docker/pulls/restgo/rest)](https://hub.docker.com/r/restgo/rest)\n[![chat](https://img.shields.io/badge/chat-discord-brightgreen)](https://discord.gg/vawh9RSzQ9)\n\nRest serves a fully RESTful API from any SQL database, PostgreSQL, MySQL, and SQLite are supported for now.\n\nVisit https://rest-go.com for the full documentation, examples, and guides.\n\n## Getting Started\n\n### Start with Docker\n\nrun the server and connect to an existing database\n```bash\n# connect to postgres\ndocker run -p 3000:3000 restgo/rest -db.url \"postgres://user:passwd@localhost:5432/db\"\n\n# connect to sqlite file with volume\ndocker run -p 3000:3000 -v $(pwd):/data restgo/rest -db.url \"sqlite:///data/my.db\"\n```\n\n### Use API\n\nAssume there is a `todos` table in the database with `id`, and `title` fields:\n\n```bash\n# Create a todo item\ncurl -XPOST \"localhost:3000/todos\" -d '{\"title\": \"setup api server\", \"done\": false}'\n\n# Read\ncurl -XGET \"localhost:3000/todos/1\"\n\n# Update\ncurl -XPUT \"localhost:3000/todos/1\" -d '{\"title\": \"setup api server\", \"done\": true}'\n\n# Delete\ncurl -XDELETE \"localhost:3000/todos/1\"\n```\n\n## Use the binary\n\n### Precompiled binaries\n\nPrecompiled binaries for released versions are available on the [Releases page](https://github.com/rest-go/rest/releases), download it to your local machine, and running it directly is the fastest way to use Rest.\n\n### Go install\n\nIf you are familiar with Golang, you can use go install\n```bash\ngo install github.com/rest-go/rest\n```\n\n### Run server\n``` bash\nrest -db.url \"mysql://username:password@tcp(localhost:3306)/db\"\n```\n\n## Use it as a Go library\nIt also works to embed the rest server into an existing Go HTTP server\n\n``` bash\ngo get github.com/rest-go/rest\n```\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/rest-go/rest/pkg/server\"\n)\n\nfunc main() {\n\th := server.New(\u0026server.DBConfig{URL: \"sqlite://my.db\"}, server.Prefix(\"/admin\"))\n\thttp.Handle(\"/admin/\", h)\n\tlog.Fatal(http.ListenAndServe(\":3001\", nil))\n}\n```\n","funding_links":[],"categories":["Go","golang"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frest-go%2Frest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frest-go%2Frest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frest-go%2Frest/lists"}