{"id":28512387,"url":"https://github.com/leafycodes/express-rest-api-mysql","last_synced_at":"2026-04-09T08:10:41.897Z","repository":{"id":297239717,"uuid":"996133026","full_name":"leafycodes/express-rest-api-mysql","owner":"leafycodes","description":"This project is an API (MySQL, Express.js, Node.js) application with SQL and EJS integration. It provides a CRUD-based system for managing and displaying database records using a RESTful API.","archived":false,"fork":false,"pushed_at":"2025-06-08T07:30:45.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-04T01:36:48.039Z","etag":null,"topics":["api","backend","ejs","express","html","javascript","mern","nodejs","webdevelopment"],"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/leafycodes.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-04T13:58:36.000Z","updated_at":"2025-06-08T07:30:10.000Z","dependencies_parsed_at":"2025-06-04T21:03:42.685Z","dependency_job_id":"4b8b7382-35fb-49ed-95a3-3298044206eb","html_url":"https://github.com/leafycodes/express-rest-api-mysql","commit_stats":null,"previous_names":["leafycodes/express-rest-api-mysql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leafycodes/express-rest-api-mysql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafycodes%2Fexpress-rest-api-mysql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafycodes%2Fexpress-rest-api-mysql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafycodes%2Fexpress-rest-api-mysql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafycodes%2Fexpress-rest-api-mysql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leafycodes","download_url":"https://codeload.github.com/leafycodes/express-rest-api-mysql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leafycodes%2Fexpress-rest-api-mysql/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267865752,"owners_count":24157343,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","backend","ejs","express","html","javascript","mern","nodejs","webdevelopment"],"created_at":"2025-06-09T00:37:50.838Z","updated_at":"2026-04-09T08:10:41.863Z","avatar_url":"https://github.com/leafycodes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SQL-MERN Stack Project\n\nThis project is an API (MySQL, Express.js, Node.js) application with SQL and EJS integration. It provides a CRUD-based system for managing and displaying database records using a RESTful API.\n\n## 🧩 Tech Stack\n\n- **Frontend**: basic HTML/EJS\n- **Backend**: Express.js (Node.js)\n- **Database**: MySQL (using `mysql2` package)\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Node.js\n- MySQL\n- npm\n- Express.js\n- uuid\n- @faker-js/faker\n- method-override\n\n### Setup\n\n1. Clone the repo:\n   ```bash\n   git clone https://github.com/leafycodes/express-rest-api-mysql.git\n   cd express-rest-api-mysql\n   ```\n\n2. Install backend dependencies:\n    ```bash\n    cd express-rest-api-mysql\n    npm install\n    ```\n3. Setup your MySQL database:\n   - Create a database and table as expected by the code.\n   - Update the credentials inside server/database using faker template provided in index.js.\n\n4. Start the server and visit `http://localhost:8080/`\n\n## API endpoints:\n\n- `GET /users` — fetch all users\n- `POST /users` — create a new user\n- `PATCH /users/:id` — update username if the password is correct\n- `DELETE /users/:id` — delete user if password is correct\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafycodes%2Fexpress-rest-api-mysql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleafycodes%2Fexpress-rest-api-mysql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleafycodes%2Fexpress-rest-api-mysql/lists"}