{"id":21826859,"url":"https://github.com/solarluiso/api-rest-ts-postgresql","last_synced_at":"2026-04-07T16:32:22.551Z","repository":{"id":264932021,"uuid":"894582598","full_name":"solarluiso/api-rest-ts-postgresql","owner":"solarluiso","description":"RESTful API built with Node.js and PostgreSQL, enabling CRUD operations on users using token-based authentication via JWT.","archived":false,"fork":false,"pushed_at":"2024-11-27T19:22:32.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T12:21:44.177Z","etag":null,"topics":["api-rest","auth","bcrypt","docker","expressjs","jwt","nodejs","postgresql","prisma"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/solarluiso.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":"2024-11-26T15:58:31.000Z","updated_at":"2024-12-01T18:54:27.000Z","dependencies_parsed_at":"2025-03-21T12:33:57.131Z","dependency_job_id":null,"html_url":"https://github.com/solarluiso/api-rest-ts-postgresql","commit_stats":null,"previous_names":["solarluiso/api-rest-ts-postgresql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/solarluiso/api-rest-ts-postgresql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solarluiso%2Fapi-rest-ts-postgresql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solarluiso%2Fapi-rest-ts-postgresql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solarluiso%2Fapi-rest-ts-postgresql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solarluiso%2Fapi-rest-ts-postgresql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solarluiso","download_url":"https://codeload.github.com/solarluiso/api-rest-ts-postgresql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solarluiso%2Fapi-rest-ts-postgresql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31520511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["api-rest","auth","bcrypt","docker","expressjs","jwt","nodejs","postgresql","prisma"],"created_at":"2024-11-27T18:11:09.320Z","updated_at":"2026-04-07T16:32:22.529Z","avatar_url":"https://github.com/solarluiso.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NODE JS: REST API (CRUD) with PostgreSQL and JWT\n\nThis repository contains a REST API built with Node.js and PostgreSQL, enabling CRUD operations (create, read, update, delete) on users using token-based authentication via JWT (Json Web Token).\n\n## How to Use It:\n\n1.  Clone the repository: `git clone https://github.com/solarluiso/api-rest-ts-postgresql`\n2.  Open the project in your code editor and run the following command in your terminal: `npm install`\n3.  Set up your environment variables by creating a `.env` file using the template provided.\n4.  With Docker Desktop running, execute: `docker compose up -d`\n5.  Start the server by running: `npm run dev`\n\n## Requirements:\n\n- **NODE**: Ensure Node.js is installed on your operating system.\n- **DOCKER**: Required to run the MongoDB image in a container.\n- **GIT**: Make sure Git is also installed.\n\n## Steps to configure a project like this:\n\n1. Initialize the project:\n   `npm init -y`\n2. Install the required packages:\n   `npm install express jsonwebtoken bcrypt @prisma/client dotenv typescript`\n   `npm install --save-dev ts-node-dev @types/express @types/jsonwebtoken @types/bcrypt @types/node rimraf prisma`\n3. Initialize TypeScript configuration:\n   `npx tsc --init --outDir dist/ --rootDir src`\n4. Update the TypeScript configuration file with excluded and included folders:\n   `\"exclude\": [\"node_modules\",\"dist\" ],\n\"include\": [\"src\"]`\n5. Initialize Prisma:\n   `npx prisma init`\n6. Generate Prisma client:\n   `npx prisma generate`\n7. Add models in `schema.prisma`\n8. Apply migrations:\n   `npmx prisma migrate dev`\n9. Start Docker Compose:\n   `docker-compose up -d`\n10. Add the following scripts to `package.json`:\n    `\"dev\": \"tsnd --respawn --clear src/app.ts\", \"build\": \"rimraf ./dist \u0026\u0026 tsc\", \"start\": \"npm run build \u0026\u0026 node dist/app.js\"`\n\n## METHODS\n\n### POST\n\nhttp://localhost:3000/auth/register\nhttp://localhost:3000/users\nhttp://localhost:3000/auth/login\n\n### GET ALL\n\nhttp://localhost:3000/users\n\n### GET, PUT, DELETE BY ID\n\nhttp://localhost:3000/users/:id\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolarluiso%2Fapi-rest-ts-postgresql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolarluiso%2Fapi-rest-ts-postgresql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolarluiso%2Fapi-rest-ts-postgresql/lists"}