Skip to content

Nodejs basics#746

Open
madii09 wants to merge 8 commits intoAlreadyBored:mainfrom
madii09:nodejs-basics
Open

Nodejs basics#746
madii09 wants to merge 8 commits intoAlreadyBored:mainfrom
madii09:nodejs-basics

Conversation

@madii09
Copy link

@madii09 madii09 commented Mar 1, 2026

  1. Task: Task
  2. Screenshot:
  3. Deployment:
  4. Done: 01.03.2026 / Deadline: 03.03.2026
  5. Score: 206/ 206

FS Module (src/fs)

  • create.js – creates fresh.txt with content, throws error if file exists
  • copy.js – copies files folder to files_copy, throws error on missing folder or existing copy
  • rename.js – renames wrongFilename.txtproperFilename.md, handles errors
  • delete.js – deletes fileToRemove.txt, throws error if missing
  • list.js – prints filenames from files folder, error if folder missing
  • read.js – prints content of fileToRead.txt, error if file missing

CLI Module (src/cli)

  • env.js – parses environment variables with RSS_ prefix
  • args.js – parses command-line arguments in --prop value format

Modules (src/modules)

  • esm.mjs – converted from CommonJS cjsToEsm.cjs to ES Module

Hash (src/hash)

  • calcHash.js – calculates SHA256 hash using Streams API

Streams (src/streams)

  • read.js – reads file using Readable Stream
  • write.js – writes stdin to file using Writable Stream
  • transform.js – reverses stdin text using Transform Stream

Zlib (src/zip)

  • compress.js – compresses file to archive.gz using zlib and Streams API
  • decompress.js – restores file from archive.gz

Worker Threads (src/wt)

  • worker.js – calculates nth Fibonacci from main thread input
  • main.js – spawns workers equal to CPU cores, sends incremental numbers, collects results

Child Processes (src/cp)

  • cp.js – spawns child process (script.js), handles IPC between stdin/stdout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant