{"id":25066070,"url":"https://github.com/benjaminpla/express_sql","last_synced_at":"2026-04-07T07:43:37.337Z","repository":{"id":194960151,"uuid":"691488703","full_name":"benjaminPla/express_sql","owner":"benjaminPla","description":"This project is a demonstration of a highly scalable web application built using SQL, MariaDB (Docker), MySQL, Express.js with Express Router, Middlewares, TypeScript, and environment variables. Postman is used for testing the API endpoints.","archived":false,"fork":false,"pushed_at":"2023-09-15T18:43:53.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-03T13:20:10.198Z","etag":null,"topics":["api","backend","database","docker","environment-variables","express","git","mariadb","middlewares","mysql","node","postman","routing","sql","typescript"],"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/benjaminPla.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}},"created_at":"2023-09-14T09:28:33.000Z","updated_at":"2023-09-15T18:45:06.000Z","dependencies_parsed_at":"2023-09-16T00:23:24.309Z","dependency_job_id":null,"html_url":"https://github.com/benjaminPla/express_sql","commit_stats":null,"previous_names":["benjaminpla/mariadb_mysql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/benjaminPla/express_sql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminPla%2Fexpress_sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminPla%2Fexpress_sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminPla%2Fexpress_sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminPla%2Fexpress_sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benjaminPla","download_url":"https://codeload.github.com/benjaminPla/express_sql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminPla%2Fexpress_sql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31504897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","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","backend","database","docker","environment-variables","express","git","mariadb","middlewares","mysql","node","postman","routing","sql","typescript"],"created_at":"2025-02-06T20:00:14.536Z","updated_at":"2026-04-07T07:43:37.317Z","avatar_url":"https://github.com/benjaminPla.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API | Express + SQL\n\n## Overview\n\nThis project is a demonstration of a highly scalable web application built using SQL, MariaDB (Docker), MySQL, Express.js with Express Router, Middlewares, TypeScript, and environment variables.\nPostman is used for testing the API endpoints.\n\n## Structure\n\n```\n├── README.md\n├── api\n│   ├── index.ts\n│   ├── middlewares\n│   │   ├── orders.ts\n│   │   └── users.ts\n│   ├── models\n│   │   ├── Orders.ts\n│   │   └── Users.ts\n│   ├── routes\n│   │   └── index.ts\n│   └── utils\n│       └── index.ts\n├── database\n│   ├── config.ts\n│   ├── index.ts\n│   ├── mock\n│   │   ├── orders.sql\n│   │   └── users.sql\n│   └── tables\n│       ├── orders.ts\n│       └── users.ts\n├── interfaces\n│   └── index.ts\n├── package-lock.json\n├── package.json\n└── tsconfig.json\n```\n\n## Database\n\nThis project utilizes both MariaDB (Docker) and MySQL databases. You can set up the databases by following these steps:\n\n1. Start the MariaDB container:\n\n```bash\ndocker run --name mariadb-container -e MYSQL_ROOT_PASSWORD=yourpassword -d -p 3306:3306 mariadb\n```\n\nReplace `yourpassword` with your desired root password.\n\n2. Create a MySQL database using your preferred MySQL client and configure the connection in the .env file.\n\n3. Populate the Database (Optional), populate the database with mock data provided in `./database/mock`.\n\n## Configuration\n\nTo configure the project, follow these steps:\n\n1. Create a .env file in the project root and add the necessary environment variables:\n\n```env\nAPI_PORT=3000\nDB_HOST=localhost\nDB_PORT=3306\nDB_USER=root\nDB_PASSWORD=yourpassword\n```\n\n## Running Locally\n\nTo run the project locally, follow these steps:\n\n1. Install project dependencies:\n\n```bash\nnpm install\n```\n\n2. Start the development server:\n\n```bash\nnpm run start\n```\n\n## Endpoints\n\nThis project provides a RESTful API with the following endpoints for managing users and orders:\n\n| Endpoint      | Description                                     | HTTP Method |\n| ------------- | ----------------------------------------------- | ----------- |\n| `/users`      | Retrieve a list of all users                    | GET         |\n| `/users/:id`  | Retrieve a user by their unique ID              | GET         |\n| `/users`      | Create a new user                               | POST        |\n| `/users/:id`  | Update an existing user by their unique ID      | PUT         |\n| `/users/:id`  | Delete a user by their unique ID                | DELETE      |\n| `/orders`     | Retrieve a list of all orders with user details | GET         |\n| `/orders/:id` | Retrieve an order by its unique ID              | GET         |\n| `/orders`     | Create a new order                              | POST        |\n| `/orders/:id` | Update an existing order by its unique ID       | PUT         |\n| `/orders/:id` | Delete an order by its unique ID                | DELETE      |\n\n## Images\n\n![Screenshot 2023-09-14 144353](https://github.com/benjaminPla/mariadb_mysql/assets/85419447/6a629cd2-f8f5-458b-ad93-6c46745e967f)\n\n![Screenshot 2023-09-15 192648](https://github.com/benjaminPla/mariadb_mysql/assets/85419447/099aa5c4-11ce-42ae-91d2-0b7494056d4a)\n\n![Screenshot 2023-09-14 144310](https://github.com/benjaminPla/mariadb_mysql/assets/85419447/f117e51e-2e7f-4493-a6b4-665ab7007d8e)\n\n![Screenshot 2023-09-15 104308](https://github.com/benjaminPla/mariadb_mysql/assets/85419447/5e99db71-8f62-4189-b3ef-3b95c3b61957)\n\n![Screenshot 2023-09-15 104236](https://github.com/benjaminPla/mariadb_mysql/assets/85419447/ef66f412-8b31-4237-be11-f17e64d32c50)\n\n![Screenshot 2023-09-15 104224](https://github.com/benjaminPla/mariadb_mysql/assets/85419447/ba052036-4ac4-4141-accd-bf76ffc4c36a)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenjaminpla%2Fexpress_sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenjaminpla%2Fexpress_sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenjaminpla%2Fexpress_sql/lists"}