{"id":25826910,"url":"https://github.com/eliastamer/mysql-nodejs-app","last_synced_at":"2026-05-06T10:39:17.805Z","repository":{"id":252635294,"uuid":"840692973","full_name":"EliasTamer/mysql-nodejs-app","owner":"EliasTamer","description":"nodejs app that leverages a MySQL database.","archived":false,"fork":false,"pushed_at":"2025-02-08T08:44:46.000Z","size":62,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T08:51:26.070Z","etag":null,"topics":["docker","nodejs","sql"],"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/EliasTamer.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-10T11:51:51.000Z","updated_at":"2025-02-08T08:44:49.000Z","dependencies_parsed_at":"2025-02-28T15:52:39.341Z","dependency_job_id":"c8c5363a-6e64-4067-9f48-194da3ef5b45","html_url":"https://github.com/EliasTamer/mysql-nodejs-app","commit_stats":null,"previous_names":["eliastamer/mysql-nodejs-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EliasTamer/mysql-nodejs-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliasTamer%2Fmysql-nodejs-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliasTamer%2Fmysql-nodejs-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliasTamer%2Fmysql-nodejs-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliasTamer%2Fmysql-nodejs-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EliasTamer","download_url":"https://codeload.github.com/EliasTamer/mysql-nodejs-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliasTamer%2Fmysql-nodejs-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32689580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-06T08:33:17.875Z","status":"ssl_error","status_checked_at":"2026-05-06T08:33:17.221Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["docker","nodejs","sql"],"created_at":"2025-02-28T15:45:37.171Z","updated_at":"2026-05-06T10:39:17.764Z","avatar_url":"https://github.com/EliasTamer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is this project?\n\nthis is a node backend that serves endpoints for an e-commerce app.\n\n# Steps to launch the app\n\n1- modify your env variables in the compose.yaml file. (mainly everything related to database credentials, rest can stay the same)\n\n\n2- run the app, this should create 2 docker containers, one for the MySQL database and another one for the node backend.\n\n```\ndocker compose up --build\n```\n\n\n3- watch for local changes so that you can sync them directly to your docker container\n\n``` \ndocker compose watch\n```\n\n\nthis should create 2 docker containers, one for the MySQL database and another one for the node backend.\n\n\n\n4- run the below queries inside your MySQL container terminal to create the needed tables.\n\n```\nCREATE TABLE categories (\n    id INT AUTO_INCREMENT PRIMARY KEY,\n    name VARCHAR(255) NOT NULL\n);\n\nCREATE TABLE products (\n    id INT AUTO_INCREMENT PRIMARY KEY,\n    name VARCHAR(255) NOT NULL,\n    description TEXT,\n    price INT NOT NULL,\n    base64Img LONGTEXT,\n    categoryId INT NOT NULL,\n    quantity INT NOT NULL,\n    UNIQUE KEY (name),\n    FOREIGN KEY (categoryId) REFERENCES categories(id)\n);\n\nCREATE TABLE orders (\n    id INT AUTO_INCREMENT PRIMARY KEY,\n    user_id INT NOT NULL,\n    product_id INT NOT NULL,\n    quantity INT NOT NULL,\n    FOREIGN KEY (user_id) REFERENCES users(id),\n    FOREIGN KEY (product_id) REFERENCES products(id)\n);\n\nCREATE TABLE users (\n    id INT AUTO_INCREMENT PRIMARY KEY,\n    email VARCHAR(255) NOT NULL,\n    name VARCHAR(255) NOT NULL,\n    password VARCHAR(255) NOT NULL,\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n    UNIQUE KEY (email),\n    UNIQUE KEY (name),\n    UNIQUE KEY (password)\n);\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliastamer%2Fmysql-nodejs-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feliastamer%2Fmysql-nodejs-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliastamer%2Fmysql-nodejs-app/lists"}