{"id":24998366,"url":"https://github.com/riascho/postgres-node-express-api-example","last_synced_at":"2026-04-13T20:02:25.157Z","repository":{"id":275428769,"uuid":"922590067","full_name":"riascho/postgres-node-express-API-example","owner":"riascho","description":"A RESTful API built with Node.js, Express, and PostgreSQL","archived":false,"fork":false,"pushed_at":"2025-02-02T12:49:19.000Z","size":2,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T17:17:11.940Z","etag":null,"topics":["express","node-postgres","nodejs","postgresql","restful-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/riascho.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-26T16:07:49.000Z","updated_at":"2025-02-02T12:49:23.000Z","dependencies_parsed_at":"2025-02-02T13:40:01.694Z","dependency_job_id":"814b22f1-c407-4056-ae62-d8054bde2109","html_url":"https://github.com/riascho/postgres-node-express-API-example","commit_stats":null,"previous_names":["riascho/postgres-node-express-api-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/riascho/postgres-node-express-API-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riascho%2Fpostgres-node-express-API-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riascho%2Fpostgres-node-express-API-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riascho%2Fpostgres-node-express-API-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riascho%2Fpostgres-node-express-API-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riascho","download_url":"https://codeload.github.com/riascho/postgres-node-express-API-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riascho%2Fpostgres-node-express-API-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31768649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["express","node-postgres","nodejs","postgresql","restful-api"],"created_at":"2025-02-04T17:57:11.932Z","updated_at":"2026-04-13T20:02:25.140Z","avatar_url":"https://github.com/riascho.png","language":"JavaScript","readme":"# Node.js Express PostgreSQL API\n\nA RESTful API (user database) built with Node.js, Express, and PostgreSQL to demonstrate a basic example setup.\n\n**Reference**: https://blog.logrocket.com/crud-rest-api-node-js-express-postgresql\n\n## Database Connection\n\nThis app uses [node-postgres](https://node-postgres.com/) to connect to PostgreSQL using `pg.Pool`. Connection parameters are read from environment variables.\n\n## Setup\n\nCreate an `.env` file in the root directory with the following PostgreSQL configuration:\n\n| Key          | Description                    |\n| ------------ | ------------------------------ |\n| `PGUSER`     | postgres role                  |\n| `PGPASSWORD` | role password                  |\n| `PGDATABASE` | postgres database              |\n| `PGHOST`     | postgres host (e.g. localhost) |\n| `PGPORT`     | postgres port (e.g. 5432)      |\n\n## Running the App\n\nInstall dependencies:\n\n```sh\nnpm install\n```\n\nStart the server:\n\n```sh\nnpm start\n```\n\nLaunch in Development:\n\n```sh\nnpm dev\n```\n\nThe API will be available at [http://localhost:3000](http://localhost:3000).\n\n## Available Endpoints\n\n- `GET /` - API information\n- `GET /users` - Get all users\n- `GET /users/:id` - Get user by ID\n- `POST /users` - Create new user\n- `PUT /users/:id` - Update user\n- `DELETE /users/:id` - Delete user\n\n## Additional Notes\n\nEdge cases and error handling has been neglected for simplicity.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friascho%2Fpostgres-node-express-api-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friascho%2Fpostgres-node-express-api-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friascho%2Fpostgres-node-express-api-example/lists"}