{"id":20675903,"url":"https://github.com/olha-dev-fullstack/nodejs-fundamentals","last_synced_at":"2025-03-10T18:43:18.601Z","repository":{"id":262469845,"uuid":"886642016","full_name":"olha-dev-fullstack/nodejs-fundamentals","owner":"olha-dev-fullstack","description":"An overview of core elements of Node.js, including its built-in modules, streams, threads, and networking features. ","archived":false,"fork":false,"pushed_at":"2024-11-22T14:25:59.000Z","size":3186,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-17T14:53:52.550Z","etag":null,"topics":["buffers","http","net","nodejs","streams","threads"],"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/olha-dev-fullstack.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":"2024-11-11T10:47:43.000Z","updated_at":"2024-11-22T18:04:36.000Z","dependencies_parsed_at":"2024-11-12T16:27:43.069Z","dependency_job_id":"eca31061-f3cf-45fc-a16d-cf24db65e8f3","html_url":"https://github.com/olha-dev-fullstack/nodejs-fundamentals","commit_stats":null,"previous_names":["olha-dev-fullstack/nodejs-fundamentals"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olha-dev-fullstack%2Fnodejs-fundamentals","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olha-dev-fullstack%2Fnodejs-fundamentals/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olha-dev-fullstack%2Fnodejs-fundamentals/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olha-dev-fullstack%2Fnodejs-fundamentals/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olha-dev-fullstack","download_url":"https://codeload.github.com/olha-dev-fullstack/nodejs-fundamentals/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242905023,"owners_count":20204557,"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","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":["buffers","http","net","nodejs","streams","threads"],"created_at":"2024-11-16T21:11:05.463Z","updated_at":"2025-03-10T18:43:18.588Z","avatar_url":"https://github.com/olha-dev-fullstack.png","language":"JavaScript","readme":"# Node.js Fundamentals\n\nIn this repository there is an overview of core elements of Node.js, including its built-in modules, streams, threads, and networking features. Each folder in the project demonstrates specific concepts or use cases with example code which is helpful to understand key concepts of how Node.js works.\n\n## Table of Contents\n\n1. [Buffers](#buffers)\n2. [Compression](#compression)\n3. [Event Emitter](#event-emitter)\n4. [File System](#file-system)\n5. [HTTP](#http)\n6. [Networking](#networking)\n7. [Streams](#streams)\n8. [Threads](#threads)\n\n---\n\n### Buffers\n\nExplore Node.js `Buffer` objects, which allow handling binary data efficiently.\n\n---\n\n### Compression\n\nExamples of file compression and decompression in Node.js using:\n\n- **Zlib**: Standard Nodejs compression library.\n- **Brotli**: A modern compression algorithm.\n- **Files**: Example files for testing compression.\n\n#### Notable Files\n\n- `app.js`: Demonstrates compression with Brotli.\n- `benchmark.js`: Benchmarks compression performance.\n\n---\n\n### Event Emitter\n\nLearn about the `EventEmitter` class in Node.js for creating and handling custom events.\n\n---\n\n### File System\n\nUnderstand how to interact with the file system in Node.js for reading, writing, and managing files.\n\n---\n\n### HTTP\n\nDiscover how to create and manage HTTP servers and clients using the Node.js `http` module.\n\n- **espresso.js**: Class which replaces popular Node.js framework for writing servers and routers in this example. Written using ode.js `http` module.\n- **simple-web**: An application where user can login and create posts. Works using `espresso.js`.\n\n---\n\n### Networking\n\nNetworking-related examples, including:\n\n- **Chat App**: A simple real-time chat application.\n- **Simple TCP**: Demonstrates TCP socket communication.\n- **Uploader App**: Simple app for uploading files using Node.js.\n\n---\n\n### Streams\n\nLearn how to use streams in Node.js for handling large data efficiently. Includes examples of:\n\n- Custom streams: `Readable`, `Writable`, and `Duplex` streams.\n- Practical use cases: Copying files, encrypting/decrypting data, and working with large files.\n\n---\n\n### Threads\n\nExplore multithreading in Node.js using the `worker_threads` module. Examples include:\n\n- **Crypto-Heavy**: Handling computationally intensive tasks.\n- **Deadlocks**: Understanding and preventing thread deadlocks.\n- **Heavy Server**: Using threads to offload server tasks.\n- **Prime Generator**: Generating prime numbers in worker threads.\n- **Race Condition**: Demonstrating and resolving race conditions.\n- **Request Sender**: Using threads for high-performance network requests.\n- **Shared Memory**: Illustrates inter-thread communication using shared memory.\n- **Worker Pool**: Create and manage custom pool of worker threads.\n- **Zlib Heavy**: Compressing data using `zlib` in worker threads.\n\n---\n\n## How to Run\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/yourusername/nodejs-fundamentals.git\n   ```\n2. Navigate to the desired folder:\n   ```bash\n   cd nodejs-fundamentals/\u003cfolder-name\u003e\n   ```\n3. Install dependencies (if any):\n   ```bash\n   npm install\n   ```\n4. Run the example:\n   ```bash\n   node \u003cfile-name\u003e.js\n   ```\n\n---\n\n## Prerequisites\n\n- **Node.js**: Install the latest LTS version from [Node.js](https://nodejs.org/).\n- **npm**: Comes bundled with Node.js installation.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folha-dev-fullstack%2Fnodejs-fundamentals","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folha-dev-fullstack%2Fnodejs-fundamentals","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folha-dev-fullstack%2Fnodejs-fundamentals/lists"}