{"id":13500910,"url":"https://github.com/pgrest/pgrest","last_synced_at":"2025-03-29T07:32:07.441Z","repository":{"id":57157358,"uuid":"8044664","full_name":"pgrest/pgrest","owner":"pgrest","description":"enable REST in postgres","archived":false,"fork":false,"pushed_at":"2016-08-31T15:15:54.000Z","size":1561,"stargazers_count":425,"open_issues_count":39,"forks_count":24,"subscribers_count":38,"default_branch":"master","last_synced_at":"2024-10-30T02:56:30.816Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"LiveScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pgrest.png","metadata":{"files":{"readme":"README.md","changelog":"History.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":"2013-02-06T04:38:51.000Z","updated_at":"2024-09-27T16:11:17.000Z","dependencies_parsed_at":"2022-09-03T04:42:43.918Z","dependency_job_id":null,"html_url":"https://github.com/pgrest/pgrest","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgrest%2Fpgrest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgrest%2Fpgrest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgrest%2Fpgrest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgrest%2Fpgrest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgrest","download_url":"https://codeload.github.com/pgrest/pgrest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246155998,"owners_count":20732355,"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-07-31T22:01:18.889Z","updated_at":"2025-03-29T07:32:06.970Z","avatar_url":"https://github.com/pgrest.png","language":"LiveScript","funding_links":[],"categories":["LiveScript","others"],"sub_categories":[],"readme":"pgrest\n======\n\n[![Build Status](https://travis-ci.org/pgrest/pgrest.png?branch=master)](https://travis-ci.org/clkao/pgrest)\n\nWARNING: This is work in progress. The APIs will remain in flux until 1.0.0. Suggestions welcome!\n\n# PgREST is...\n\n* a JSON document store\n* running inside PostgreSQL\n* working with existing relational data\n* capable of loading Node.js modules\n* compatible with MongoLab's REST API\n* and Firebase's real-time API!\n\nWant to learn more? Check out our homepage at [pgre.st](http://pgre.st/) and the [wiki](https://github.com/clkao/pgrest/wiki).\n\n# Installation\n\nPostgreSQL 9.0 is required; we recommend using 9.2 or later, and nodejs `0.10.x`.\n\nYou need to install the `plv8js` extension for PostgreSQL.  If you're on OS X, [Postgres.app](http://postgresapp.com) comes with it pre-installed.  Otherwise, see [Installation](https://github.com/clkao/pgrest/wiki/Installation) for details.\n\nAfter you install, create the `plv8` extension\n\n    psql -U \u003cuser\u003e -c \"create extension plv8\"\n\nIf you got error message `Reason: image not found`\n\nPlease download the version after version `9.2.4.3`\n\n[PostgresApp release notes](https://github.com/PostgresApp/PostgresApp/releases)\n\nOnce the extension is installed, simply use `npm` to install pgrest:\n\n    % npm i -g pgrest\n\nWhen installing from git checkout, make sure you do `npm i` before `npm i -g .`\n\n# Trying pgrest:\n\n    % psql test\n    test=# CREATE TABLE foo (_id int, info json, tags text[]);\n    CREATE TABLE\n    test=# INSERT INTO foo VALUES (1, '{\"f1\":1,\"f2\":true,\"f3\":\"Hi I''m \\\"Daisy\\\"\"}', '{foo,bar}');\n    INSERT 0 1\n\n    % pgrest --db test\n    Serving `test` on http://127.0.0.1:3000/collections\n\nYou can now access foo content at `http://127.0.0.1:3000/collections/foo`\n\n## Reading:\n\n    curl http://127.0.0.1:3000/collections/foo/1\n\n    curl -g 'http://127.0.0.1:3000/collections/foo?q={\"_id\":1}'\n    curl -g 'http://127.0.0.1:3000/collections/foo?q={\"tags\":{\"$contains\":\"foo\"}}'\n\n\nThe parameter is similar to [MongoLab's REST API](http://docs.mongolab.com/restapi/) for listing documents.\n\nNote that if you use `curl`, you should probably use `-g` to prevent curl from expanding `{}`.\n\n## Writing:\n\n    echo '{\"_id\": 5,\"info\": {\"counter\":5} }' | curl -D - -H 'Content-Type: application/json' -X POST -d @- http://localhost:3000/collections/foo\n\n# Developing\n\n## Runing tests:\n\n```\ncreatedb test\nexport TESTDBUSERNAME=postgres # optional\nexport TESTDBNAME=test\nnpm i\nnpm run test\n```\n\n# Additional web server support\n\nIn addition to the bundled `pgrest` frontend, you can also use the following frontend:\n\n* Perl: [Plack::App::PgREST](https://github.com/clkao/Plack-App-PgREST)\n* Using `ngx_postgres` (experimental)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgrest%2Fpgrest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgrest%2Fpgrest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgrest%2Fpgrest/lists"}