{"id":18614874,"url":"https://github.com/andrewjbateman/node-websockets-crud","last_synced_at":"2026-04-07T08:32:00.123Z","repository":{"id":96860807,"uuid":"394773004","full_name":"AndrewJBateman/node-websockets-crud","owner":"AndrewJBateman","description":":clipboard: Node.js with websockets to create a CRUD todo app","archived":false,"fork":false,"pushed_at":"2021-08-11T17:51:35.000Z","size":261,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-17T01:34:26.965Z","etag":null,"topics":["array-manipulations","bootstrap","bootstrap5","css3","expressjs","html5","javascript","nodejs","uuid-generator","uuid4","websockets"],"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/AndrewJBateman.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":"2021-08-10T20:24:52.000Z","updated_at":"2021-08-11T17:51:37.000Z","dependencies_parsed_at":"2023-03-30T11:36:13.961Z","dependency_job_id":null,"html_url":"https://github.com/AndrewJBateman/node-websockets-crud","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AndrewJBateman/node-websockets-crud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnode-websockets-crud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnode-websockets-crud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnode-websockets-crud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnode-websockets-crud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/node-websockets-crud/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnode-websockets-crud/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31506562,"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":["array-manipulations","bootstrap","bootstrap5","css3","expressjs","html5","javascript","nodejs","uuid-generator","uuid4","websockets"],"created_at":"2024-11-07T03:27:16.467Z","updated_at":"2026-04-07T08:32:00.094Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :zap: Node Websockets CRUD\n\n* A Node.js app to Create, Read, Update and Delete (CRUD) todo cards using Websockets\n* Tutorial code from [Fazt](https://www.youtube.com/c/FaztTech/videos) with changes to code and styling\n* **Note:** to open web links in a new window use: _ctrl+click on link_\n\n![GitHub repo size](https://img.shields.io/github/repo-size/AndrewJBateman/node-websockets-crud?style=plastic)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/node-websockets-crud?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/node-websockets-crud?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/node-websockets-crud?style=plastic)\n\n## :page_facing_up: Table of contents\n\n* [:zap: Node Websockets CRUD](#zap-node-websockets-crud)\n  * [:page_facing_up: Table of contents](#page_facing_up-table-of-contents)\n  * [:books: General Info](#books-general-info)\n  * [:camera: Screenshots](#camera-screenshots)\n  * [:signal_strength: Technologies](#signal_strength-technologies)\n  * [:floppy_disk: Setup](#floppy_disk-setup)\n  * [:computer: Code Examples](#computer-code-examples)\n  * [:clipboard: Status \u0026 To-Do List](#clipboard-status--to-do-list)\n  * [:clap: Inspiration](#clap-inspiration)\n  * [:file_folder: License](#file_folder-license)\n  * [:envelope: Contact](#envelope-contact)\n\n## :books: General Info\n\n* Socket.IO enables realtime, bi-directional communication between the client and server, with a client-side library that runs in the browser, and a server-side library for Node.js.\n* uuid npm module provides each todo with a Universally Unique IDentifier (UUID) RN Namespace (doc. Number RF4122)\n* The 16 octets of a UUID are represented as 32 hexadecimal (base-16) digits, displayed in five groups separated by hyphens, in the form 8-4-4-4-12 eg: \"ee0a1fb5-fd31-4962-bf48-bdbe5dba1bd2\"\n* Bootstrap cards used with simple styling\n\n## :camera: Screenshots\n\n![Example screenshot](./img/todo.png).\n\n## :signal_strength: Technologies\n\n* [Node.js v14](https://nodejs.org/) javascript runtime using the [Chrome V8 engine](https://v8.dev/).\n* [Babel v7](https://babeljs.io/) JS compiler\n* [Express v4](https://www.npmjs.com/package/express) web framework for node\n* [Socket.io v4](https://www.npmjs.com/package/socket.io) to enable real-time bidirectional event-based communication.\n* [uuid v8](https://www.npmjs.com/package/uuid) to create of RFC4122 UUIDs\n* [Bootstrap v5](https://getbootstrap.com/) front-end open source toolkit\n* [JSDoc](https://jsdoc.app/tags-param.html) @param tags used to provide the name, type, and description of a function parameter.\n* [ncp v2](https://www.npmjs.com/package/ncp) asynchronous recursive file \u0026 directory copying\n\n## :floppy_disk: Setup\n\n* `npm run dev` to start a dev server on `localhost:3000`\n* `npm run build` to create a build folder using Babel JS compiler\n* `npm start` to run production version on `http://localhost:3000`\n\n## :computer: Code Examples\n\n* `sockets.js` websocket functions to create, read, update \u0026 delete todos.\n\n```javascript\nexport default (io) =\u003e {\n\tio.on('connection', (socket) =\u003e {\n    console.log('user connected');\n\n\t\t// Send todos to all connected sockets\n\t\tsocket.emit('server:loadtodos', todos);\n\n    // add new todo to existing todos array using push operator\n\t\tsocket.on('client:newtodo', (newTodo) =\u003e {\n\t\t\tconst todo = { id: uuid(), ...newTodo  };\n\t\t\ttodos.unshift(todo);\n\t\t\tio.emit('server:newtodo', todo);\n\t\t});\n\n    // filter todos to remove todo with id matching delete command\n    // then rerender todos\n\t\tsocket.on('client:deletetodo', (todoId) =\u003e {\n\t\t\ttodos = todos.filter((todo) =\u003e todo.id !== todoId);\n\t\t\tio.emit('server:loadtodos', todos);\n\t\t});\n\n    // fetch todo to be edited using find function where ids match\n\t\tsocket.on('client:gettodo', (todoId) =\u003e {\n\t\t\tconst todo = todos.find((todo) =\u003e todo.id === todoId);\n\t\t\tsocket.emit('server:selectedtodo', todo);\n\t\t});\n\n    // update todo using new data for todo where ids match\n\t\tsocket.on('client:updatetodo', (updatedTodo) =\u003e {\n\t\t\ttodos = todos.map((todo) =\u003e {\n\t\t\t\tif (todo.id === updatedTodo.id) {\n\t\t\t\t\ttodo.title = updatedTodo.title;\n\t\t\t\t\ttodo.description = updatedTodo.description;\n\t\t\t\t}\n\t\t\t\treturn todo;\n\t\t\t});\n\t\t\tio.emit('server:loadtodos', todos);\n\t\t});\n\n\t\tsocket.on('disconnect', () =\u003e {\n\t\t\tconsole.log(socket.id, 'disconnected');\n\t\t});\n\t});\n};\n```\n\n## :clipboard: Status \u0026 To-Do List\n\n* Status: Working\n* To-Do: Nothing\n\n## :clap: Inspiration\n\n* [Fazt Code: Nodejs Socketio CRUD](https://www.youtube.com/watch?v=zWax5QCWCXM) in Spanish\n* [socket.io documentation](https://socket.io/get-started/chat)\n\n## :file_folder: License\n\n* N/A\n\n## :envelope: Contact\n\n* Repo created by [ABateman](https://github.com/AndrewJBateman), email: gomezbateman@yahoo.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fnode-websockets-crud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Fnode-websockets-crud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fnode-websockets-crud/lists"}