4 views
25 Jan 2026
Print a welcome message for meetcode using Node.js....
3 views
25 Jan 2026
Read MEETCODE_NAME from process.env and print it (use fallback if missing)....
4 views
25 Jan 2026
Read --topic and --level from process.argv and print them as JSON....
3 views
25 Jan 2026
Create a small math module and use it to add two numbers....
4 views
25 Jan 2026
Detect if running in CommonJS and print a friendly note....
4 views
25 Jan 2026
Print the directory of the current file and join a child path....
3 views
25 Jan 2026
Parse a JSON string safely and print an error message on failure....
3 views
25 Jan 2026
Measure how long a function takes using process.hrtime.bigint()....
3 views
25 Jan 2026
Exit with code 1 when an input number is negative....
4 views
25 Jan 2026
Write a small logger that prefixes time and 'meetcode'....
3 views
25 Jan 2026
Read a file path from stdin and print its contents....
4 views
25 Jan 2026
Write 'meetcode' to a file path, creating folders if needed....
3 views
25 Jan 2026
Append a new line to meetcode.log with current time....
4 views
25 Jan 2026
Read a directory path and print file names sorted....
5 views
25 Jan 2026
Normalize a user given path and print the safe version....
3 views
25 Jan 2026
Read a file path and print its size in bytes....
5 views
25 Jan 2026
Copy a source file to destination and print COPIED....
4 views
25 Jan 2026
Delete a file only if it exists, print OK....
3 views
25 Jan 2026
Read config.json and print config.site or 'meetcode'....
3 views
25 Jan 2026
Write JSON to a temp file then rename, print SAVED....
3 views
25 Jan 2026
Use EventEmitter to count events and print the total....
4 views
25 Jan 2026
Show the execution order between sync code, Promise.then, and setTimeout....
3 views
25 Jan 2026
Call an async function that can throw and handle it cleanly....
3 views
25 Jan 2026
Run two promises in parallel with Promise.all and print combined result....
4 views
25 Jan 2026
Add a timeout wrapper for an async task using Promise.race....
4 views
25 Jan 2026
Retry a failing async function 3 times with small delays....
4 views
25 Jan 2026
Process async tasks in order (not parallel) and print final array....
3 views
25 Jan 2026
Cancel a fetch request using AbortController and print ABORTED....
5 views
25 Jan 2026
Show how a long sync loop blocks timers (print before and after)....
4 views
25 Jan 2026
Create a delay(ms) promise and use it with await....
3 views
25 Jan 2026
Create an HTTP server that returns 'Hello meetcode'....
3 views
25 Jan 2026
Parse ?q=react&page=2 from a URL and print an object....
3 views
25 Jan 2026
Handle /, /health, and 404 using if statements....
3 views
25 Jan 2026
Read request body, parse JSON, and echo it back....
3 views
25 Jan 2026
Add simple CORS headers for GET requests....
4 views
25 Jan 2026
Return a response that sets a cookie and prints a message....
3 views
25 Jan 2026
Serve a local file for /file and 404 otherwise....
5 views
25 Jan 2026
Close idle connections by setting a server timeout and print the value....
3 views
25 Jan 2026
Build a URL for meetcode search with query params....
4 views
25 Jan 2026
Fetch JSON (mocked) and safely handle missing fields....
5 views
25 Jan 2026
Create a Buffer from a string and print its byte length....
4 views
25 Jan 2026
Read a hex string and print the utf8 text....
3 views
25 Jan 2026
Copy a file using streams and print DONE....
3 views
25 Jan 2026
Count how many lines are in stdin using streams....
3 views
25 Jan 2026
Read stdin, convert to uppercase, write to stdout....
4 views
25 Jan 2026
Pipe a readable to writable and log when drain happens....
5 views
25 Jan 2026
Write an array as JSONL (one JSON per line)....
4 views
25 Jan 2026
Compress a string with gzip and print compressed byte length....
4 views
25 Jan 2026
Read base64 from stdin and print decoded text....
3 views
25 Jan 2026
Explain why JSON.parse on stream chunks fails, and fix by buffering....
3 views
25 Jan 2026
Create a CLI that reads two numbers and an operator and prints result....
5 views
25 Jan 2026
Catch an error and print message plus stack first line....
4 views
25 Jan 2026
Print green text using ANSI codes only when stdout is TTY....
3 views
25 Jan 2026
Print a simple progress bar from 0 to 100 in steps....
4 views
25 Jan 2026
Run 'node -v' using child_process and print the version....
5 views
25 Jan 2026
Read all stdin, split into lines, and print count....
3 views
25 Jan 2026
Pick config path: MEETCODE_CONFIG env else ./meetcode.config.json....
4 views
25 Jan 2026
If --debug is present, print extra information....
3 views
25 Jan 2026
Handle Ctrl+C (SIGINT) and print Bye meetcode then exit....
3 views
25 Jan 2026
Run heavy work in worker_threads and return result to main thread....
4 views
25 Jan 2026
Print how many CPU cores exist and a note about clustering....
5 views
25 Jan 2026
Show that requiring the same module twice returns the same instance....
3 views
25 Jan 2026
Convert a string to number and print 0 if it is not a valid number....
4 views
25 Jan 2026
Generate a random id for meetcode logs using crypto....
4 views
25 Jan 2026
Merge user config JSON into defaults and print final JSON....
3 views
25 Jan 2026
Use Node assert to validate a condition and print PASS....
4 views
25 Jan 2026
Print heapUsed in MB using process.memoryUsage()....
3 views
25 Jan 2026
Use queueMicrotask to schedule work and show ordering....
3 views
25 Jan 2026
Convert a file path to file URL and back, print both....
3 views
25 Jan 2026
Cache a slow function result in a Map and print cache hits....
3 views
25 Jan 2026
Handle unhandledRejection and print a friendly message....
4 views
25 Jan 2026
Read a file using fs.promises and print its length....
4 views
25 Jan 2026
If file does not exist, create it with 'meetcode' and print CREATED/EXISTS....
3 views
25 Jan 2026
Rename a file and print RENAMED or FAIL....
3 views
25 Jan 2026
Watch a file and print CHANGED when it updates (demo)....
4 views
25 Jan 2026
Read a file line by line and print how many lines contain 'meetcode'....
4 views
25 Jan 2026
Compute total size of files in a folder recursively....
3 views
25 Jan 2026
Create a temp file path in os.tmpdir and print it....
4 views
25 Jan 2026
Compare two files by sha256 and print SAME or DIFF....
4 views
25 Jan 2026
Join a filename into the user home directory and print it....
4 views
25 Jan 2026
Print the order between process.nextTick and setImmediate....
4 views
25 Jan 2026
Listen to an event only once and print count....
5 views
25 Jan 2026
Convert a callback-style function to promise using util.promisify....
4 views
25 Jan 2026
Run tasks with max 2 concurrency and print completion order....
3 views
25 Jan 2026
Create an async generator that yields values with delay....
5 views
25 Jan 2026
Build a debounce(fn, ms) and show it only calls once....
4 views
25 Jan 2026
Run setInterval and stop after 3 ticks, print count....
4 views
25 Jan 2026
Handle SIGTERM, wait for cleanup promise, then exit....
4 views
25 Jan 2026
Process an array of tasks without blocking the event loop....
5 views
25 Jan 2026
Queue a microtask using Promise.resolve().then and print order....
6 views
25 Jan 2026
Send a GET request using https and print status code....
4 views
25 Jan 2026
Use AbortController to timeout a fetch call....
3 views
25 Jan 2026
Parse Cookie header into an object and print JSON....
5 views
25 Jan 2026
Build an Authorization header for basic auth and print it....
4 views
25 Jan 2026
Limit to 3 requests per minute per key (demo counter)....
3 views
25 Jan 2026
Detect 301/302 and print the Location header (demo)....
4 views
25 Jan 2026
Parse x-www-form-urlencoded body into object and print JSON....
5 views
25 Jan 2026
Create an http.Agent with keepAlive and print keepAlive status....
3 views
25 Jan 2026
Return 201 JSON response for /create and 404 otherwise....
4 views
25 Jan 2026
Read stdin as stream and print sha256 hex....
5 views
25 Jan 2026
Use stream.pipeline with a promise wrapper to copy file....
3 views
25 Jan 2026
Filter objects in a stream (only keep level=hard) and output JSONL....
6 views
25 Jan 2026
Join multiple buffers and print final text....
5 views
25 Jan 2026
Read text, slice first 4 bytes, and print it....
3 views
25 Jan 2026
Use PassThrough to tap into a stream and count bytes....
4 views
25 Jan 2026
Split stdin by lines using a Transform and print number of lines....
3 views
25 Jan 2026
Create a readable stream from a generator and print output....
4 views
25 Jan 2026
Count bytes in a file using createReadStream....
3 views
25 Jan 2026
Ask user name using readline and greet them with meetcode....
4 views
25 Jan 2026
If --help is passed, print usage text for a CLI....
3 views
25 Jan 2026
Print warnings to stderr and normal output to stdout....
3 views
25 Jan 2026
Show a simple spinner for 1 second then print DONE....
3 views
25 Jan 2026
Support subcommands: init and run, print what was chosen....
4 views
25 Jan 2026
Read a file path from args and print first 100 chars....
4 views
25 Jan 2026
If input string is empty, print FAIL and set exitCode=2....
3 views
25 Jan 2026
If DEBUG=1, print extra logs around a task....
3 views
25 Jan 2026
If --json flag is present, print output as JSON instead of text....
4 views
25 Jan 2026
Write text to a file and fsync so it is flushed, then print DONE....
3 views
25 Jan 2026
Return 304 when If-None-Match matches, else return content with ETag....
3 views
25 Jan 2026
Download a URL to a file using streams and print DONE....