{"id":16490426,"url":"https://github.com/sangqle/mysql-crud-nodejs","last_synced_at":"2025-10-08T02:47:57.421Z","repository":{"id":48342151,"uuid":"149490567","full_name":"sangqle/mysql-crud-nodejs","owner":"sangqle","description":"The webapp to booking movie online and payment with google pay then check QR code to coming","archived":false,"fork":false,"pushed_at":"2021-07-31T03:22:46.000Z","size":6405,"stargazers_count":10,"open_issues_count":1,"forks_count":7,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-21T01:10:43.367Z","etag":null,"topics":["mysql-server","nodejs","sample-project"],"latest_commit_sha":null,"homepage":"","language":"CSS","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/sangqle.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}},"created_at":"2018-09-19T17:52:22.000Z","updated_at":"2025-02-22T07:30:47.000Z","dependencies_parsed_at":"2022-08-26T02:21:51.357Z","dependency_job_id":null,"html_url":"https://github.com/sangqle/mysql-crud-nodejs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sangqle/mysql-crud-nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangqle%2Fmysql-crud-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangqle%2Fmysql-crud-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangqle%2Fmysql-crud-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangqle%2Fmysql-crud-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sangqle","download_url":"https://codeload.github.com/sangqle/mysql-crud-nodejs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangqle%2Fmysql-crud-nodejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278881154,"owners_count":26062175,"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-10-08T02:00:06.501Z","response_time":56,"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":["mysql-server","nodejs","sample-project"],"created_at":"2024-10-11T13:47:58.805Z","updated_at":"2025-10-08T02:47:57.383Z","avatar_url":"https://github.com/sangqle.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :stuck_out_tongue_winking_eye: This is project of Database management.\n\n:+1: This PR looks great \u003cbr\u003e\n\n## :blush: Booking online movie in cinema.\n\n![alt text](https://s3-ap-southeast-1.amazonaws.com/dbms-photo-movies/gitui.jpeg)\n\n## :blush: Demo.\n\n\u003e [Client](https://bookingpicker.firebaseapp.com/) \u003cbr\u003e\n \u003e [Verify](https://verifybookingorder.firebaseapp.com/)\n\n[![Build Status](https://vscode.visualstudio.com/_apis/public/build/definitions/a4cdce18-a05c-4bb8-9476-5d07e63bfd76/1/badge?branchName=master)](https://aka.ms/vscode-builds)\n\n## :smiley: Requirement\n\n\u003e [Nodejs](https://nodejs.org/en/) \u003c/br\u003e\n \u003e [Mysql Server](https://dev.mysql.com/downloads/mysql/) \u003c/br\u003e\n \u003e [MySQL Workbench](https://dev.mysql.com/downloads/workbench/) \u003c/br\u003e\n \u003e [PostMan TestAPI](https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=vi)\n\n## How to run:\n\n### Config MySQL server\n\n```javascript\n// Create a file in /server/src/mysql/config.js\n{\n  const config = {\n    host: \"yourHostName\",\n    port: 3306,\n    user: \"yourUser\",\n    password: \"yourPassWord\",\n    database: \"yourDatabaseName\",\n    multipleStatements: true\n  };\n/* User for AWS config S3\n  const accessKey = \"xxxxxxxxxxxxxxxxxx\";\n  const secretKey = \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxx\";\n  const Bucket = \"??????\";\n  const ACL = \"public-read-write\";\n  const ContentType = \"image/jpg\";\n*/\n  module.exports = {\n    config,\n  };\n}\n```\n\n### Config Server \u0026\u0026 Client\n\n```\n1. Open a terminal\n    $ git clone https://github.com/lequangsang97/mysql-crud-nodejs.git\n    $ cd mysql-crud-nodejs \u0026\u0026 code .\n    $ cd server \u0026\u0026 npm install nodemon\n    $ npm install\n    $ npm run dev:start\n\n2. Open another terminal\n    $ cd client \u0026\u0026 npm install\n    $ npm start\n\n```\n\n## Node Host: [http://localhost:8080](http://localhost:8080)\u003cbr\u003e\n\n## React Host: [http://localhost:3000](http://localhost:3000)\u003cbr\u003e\n\n## :ok_hand: API\n- [x] Post: http://localhost:8080/user/create/account\u003cbr\u003e\n- [x] Post: http://localhost:8080/user/login\u003cbr\u003e\n- [x] Get: http://localhost:8080/user/get/all/movie\u003cbr\u003e\n- [x] Get: http://localhost:8080/user/get/date/:idMovie\u003cbr\u003e\n- [x] Get: http://localhost:8080/user/get/time/:idMovie/:idDate\u003cbr\u003e\n- [x] Get: http://localhost:8080/user/get/seated/:idMovie/:idDate/:idTime\u003cbr\u003e\n- [x] Post: http://localhost:8080/user/booking\u003cbr\u003e\n- [x] Get: http://localhost:8080/user/get/order\u003cbr\u003e\n- [x] Path: http://localhost:8080/user/update/seat\u003cbr\u003e\n- [x] Post: http://localhost:8080/admin/add/movie\u003cbr\u003e\n- [x] Get: http://localhost:8080/admin/get/all/order\u003cbr\u003e\n- [x] Get: http://localhost:8080/admin/get/all/order/bymovie/:idMovie\u003cbr\u003e\n- [x] Get: http://localhost:8080/admin/get/all/order/bydate/:date\u003cbr\u003e\n- [x] Get: http://localhost:8080/admin/get/all/order/bytime/:timeStart/:timeEnd\u003cbr\u003e\n- [x] Delete: http://localhost:8080/admin/delete/movie/:idMovie\u003cbr\u003e\n- [x] Delete: http://localhost:8080/admin/get/movie/:idMovie\u003cbr\u003e\n- [x] Delete: http://localhost:8080/admin/edit/movie/:idMovie\u003cbr\u003e\n\n\n\n- User\n  - [x] POST: [http://localhost:8080/user/create/account](http://localhost:8080/user/create/account) \u003cbr\u003e\n        Request:\n    ```javascript\n    {\n        \"name\": \"Nguyen Phuoc Thanh\",\n        \"email\": \"thanhnguyen@gmail.com\",\n        \"password\": \"makhau8kytu\",\n        \"sdt\": \"0123456789\"\n    }\n    ```\n    Response:\n    ```javascript\n    {\n        \"name\": \"Nguyen Phuoc Thanh\",\n        \"email\": \"thanhnguyen@gmail.com\",\n        \"sdt\": \"0123456789\"\n    }\n    ```\n  - [x] POST: [http://localhost:8080/user/login](http://localhost:8080/user/login) \u003cbr\u003e\n        Request:\n    ```javascript\n    {\n        \"email\": \"thanhnguyen@gmail.com\",\n        \"password\": \"pass\",\n    }\n    ```\n    Response:\n    ```javascript\n    {\n        \"id_user\": 35,\n        \"name\": \"Nguyen Phuoc Thanh\",\n        \"email\": \"thanhnguyen@gmail.com\",\n        \"role\": \"admin\",\n        \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZF91c2VyIjozMywibmFtZSI6IkxlIFF1YW5nIFNhbmciLCJlbWFpbCI6InNhbmcubGVxdWFuZ0BnbWFpbC5jb20iLCJyb2xlIjoidXNlciIsImlhdCI6MTU0MTA0NTIwMH0.0b_pHp5e49SVP-Mod8SVr0oRzizPKcpSy07yaCgTbn4\"\n    }\n    ```\n  - [x] GET: [http://localhost:8080/user/get/all/movie](http://localhost:8080/user/get/all/movie) \u003cbr\u003e\n    ```javascript\n    {\n        \"instaces\": 6,\n        \"movies\": [\n            {\n                \"id_movie\": 1,\n                \"title\": \"Bad Times At The El Royale\",\n                \"director\": \"Bridges\",\n                \"released\": 2018,\n                \"length\": 110,\n                \"price\": 120,\n                \"imagUrl\": \"https://lottecinemavn.com/Lotte/files/44/4427ab16-6b3e-45c8-9dee-58c8ad84304b.png\"\n            }\n            ...\n        ]\n    }\n    ```\n  - [x] GET: [http://localhost:8080/user/get/date/:id_movie](http://localhost:8080/user/get/date/1) \u003cbr\u003e\n    \u003e Ex: http://localhost:8080/user/get/date/1\u003cbr\u003e\n    \u003e Response:\n    ```javascript\n    {\n        \"instaces\": 3,\n        \"dates\": [\n            {\n                \"id_date\": 1,\n                \"date\": 19\n            },\n            {\n                \"id_date\": 2,\n                \"date\": 20\n            }\n        ]\n    }\n    ```\n  - [x] GET: [http://localhost:8080/user/get/time/:id_movie/:id_date](http://localhost:8080/user/get/time/1/2) \u003cbr\u003e\n    \u003e Ex: http://localhost:8080/user/get/time/1/1 \u003cbr\u003e\n    \u003e Response:\n    ```javascript\n    {\n        \"instaces\": 1,\n        \"times\": [\n            {\n                \"id_time\": 1,\n                \"time\": 1140\n            }\n        ]\n    }\n    ```\n  - [x] GET: [http://localhost:8080/user/get/seated/:id_movie/:id_date/:id_time](http://localhost:8080//user/get/seated/1/2/1) \u003cbr\u003e\n    \u003e Ex: http://localhost:8080/user/get/time/1/1/2 \u003cbr\u003e\n    \u003e Response:\n    ```javascript\n    {\n        \"max_numRow\": 4,\n        \"max_numCol\": 4,\n        \"instaces\": 0,\n        \"seated\": []\n    }\n    ```\n  - [x] POST: [http://localhost:8080/user/booking](http://localhost:8080/user/booking) \u003cbr\u003e\n        Request:\n    ```javascript\n    body: {\n        \"id_movie\": \"1\",\n        \"id_date\": \"1\",\n        \"id_time\": \"1\",\n        \"id_seat\": \"1\",\n    }\n    ```\n    Response:\n    ```javascript\n    {\n        \"order\": {\n            \"id_order\": 3,\n            \"name\": \"tran cong an\",\n            \"title\": \"Bad Times At The El Royale\",\n            \"date\": 19,\n            \"time\": 1140,\n            \"id_seat\": 1\n        }\n    }\n    ```\n  - [x] GET: [http://localhost:8080/user/get/all/order](http://localhost:8080/user/get/all/order) \u003cbr\u003e\n        Request:\n        Response:\n    ```javascript\n    {\n        \"instance\": 1,\n        \"order\": [\n            {\n                \"id_order\": 8,\n                \"title\": \"Bad Times At The El Royale\",\n                \"date\": 19,\n                \"time\": 1140,\n                \"price\": 120,\n                \"id_seat\": 2\n            }\n        ]\n    }\n    ```\n  - [x] POST: [http://localhost:8080/user/delete/order](http://localhost:8080/user/delete/order) \u003cbr\u003e\n        Request:\n    ```javascript\n    body: {\n        \"id_user\": \"35\",\n    }\n    ```\n    Response:\n    ```javascript\n    {\n        \"statusCode\": 200,\n        \"results\": {\n            \"fieldCount\": 0,\n            \"affectedRows\": 1,\n            \"insertId\": 0,\n            \"serverStatus\": 2,\n            \"warningCount\": 0,\n            \"message\": \"\",\n            \"protocol41\": true,\n            \"changedRows\": 0\n        }\n    }\n    ```\n  - [x] POST: [http://localhost:8080/user/update/seat](http://localhost:8080/user/update/seat) \u003cbr\u003e\n        Request:\n    ```javascript\n    body: {\n        \"id_order\": \"2\",\n        \"id_newSeat\" : \"3\"\n    }\n    ```\n    Response:\n    ```javascript\n    {\n        \"statusCode\": 200,\n        \"results\": {\n            \"fieldCount\": 0,\n            \"affectedRows\": 1,\n            \"insertId\": 0,\n            \"serverStatus\": 2,\n            \"warningCount\": 0,\n            \"message\": \"\",\n            \"protocol41\": true,\n            \"changedRows\": 0\n        }\n    }\n    ```\n  - [x] GET: [http://localhost:8080/logout](http://localhost:8080/logout) \u003cbr\u003e\u003cbr\u003e\n- Administrator\n  - [x] POST: [http://localhost:8080/admin/add/movie](http://localhost:8080/admin/add/movie) \u003cbr\u003e\n        Request:\n        ![alt text](https://s3-ap-southeast-1.amazonaws.com/dbms-photo-movies/Capture.PNG)\n    Response:\n    ```javascript\n    {\n        message: 'Insert Thanh Cong'\n    }\n    ````\n  - [x] GET: [http://localhost:8080/admin/get/all/order/:date](http://localhost:8080/admin/get/all/order/21) \u003cbr\u003e\n    ```javascript\n    {\n        \"instance\": 1,\n        \"order\": [\n            {\n                \"id_order\": 2,\n                \"name\": \"Le Quang Sang\",\n                \"title\": \"Bad Times At The El Royale\",\n                \"date\": 21,\n                \"time\": 1140,\n                \"price\": 120,\n                \"id_seat\": 3\n            }\n        ]\n    }\n    ```\n    - [x] GET: [http://localhost:8080/admin/get/all/order/bymovie/:idMovie] \u003cbr\u003e\n    - [x] GET: [http://localhost:8080/admin/get/all/order/bytime/:timeStart/:timeEnd]\u003cbr\u003e\n    \n  * Item 2b\n    // le quang sang\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsangqle%2Fmysql-crud-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsangqle%2Fmysql-crud-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsangqle%2Fmysql-crud-nodejs/lists"}