Node.js service engineering
Progress from modules and files through streams, HTTP, asynchronous ownership, workers, persistence, security and service incidents.
20 units · Plus, Pro · 20 programming subjects + 2 security tracks
Branches show this unit’s authored theory, coding and assessment work.
Unit 1 / 20
Read a filename extension with Node
Use the supplied POSIX path API to classify a final filename suffix without opening a file or confusing dotfiles with extensions.
0 prerequisite skills · Reading, guided completion and independent success remain separate evidence.
The course, in order
Open a unit in the map to inspect its activities. Reading, guided completion, independent work and review remain distinct evidence.
- Read a filename extension with Node
Use the supplied POSIX path API to classify a final filename suffix without opening a file or confusing dotfiles with extensions.
Open this unit - Add operation context without replacing the original cause
Await an operation inside its context boundary and retain the exact original rejection as the wrapped error’s cause.
Open this unit - The environment is a map of strings, and everything else is you
Parse string-valued settings explicitly and serialize diagnostic fields without losing reserved level or Error.message.
Open this unit - Read valid UTF-8 and close the file on either outcome
Decode a complete file as strict UTF-8 and close its acquired handle after either successful reading or failure.
Open this unit - Dispose of a temporary workspace after success and failure
Acquire an operation-owned temporary directory and remove it after awaited work settles without replacing that work’s result.
Open this unit - Wait for the whole pipeline before reporting success
Await the complete stream pipeline so downstream failure cannot be reported as successful upstream completion.
Open this unit - Keep HTTP rejection separate from a transport failure
Distinguish a received non-success HTTP response from a transport rejection and preserve the corresponding diagnostic cause.
Open this unit - Dispose only the event subscriptions your scope owns
Dispose only the listeners acquired by this subscription scope, retaining external listeners and independent registrations.
Open this unit - Move CPU computation into a real worker thread
Execute CPU work in an actual worker thread and observe its result, failure and termination rather than blocking the caller.
Open this unit - Hash original bytes without collecting the whole body
Hash original input bytes incrementally without collecting the complete stream or decoding its binary content as text.
Open this unit - The difference between 404 and 405
Separate an unknown route from an unsupported method and return the declared status and allowed-method information.
Open this unit - Publish a complete JSON file or preserve the old file
Prepare and close a complete JSON file before publishing it, retaining the old destination and settling owned staging on failure.
Open this unit - Frame Unicode lines across arbitrary byte chunks
Decode incremental UTF-8 chunks before framing lines, retaining multibyte characters and the final unterminated line.
Open this unit - Wait when a writable asks its producer to pause
Pause production when write returns false and resume only after the writable’s drain or failure outcome.
Open this unit - Retry only declared transient errors within a finite budget
Retry only classified transient failures within the declared attempt budget, preserving permanent and exhausted errors.
Open this unit - Stop admitting new work and wait for accepted work
Stop admitting new work and await every already accepted operation before reporting a completed shutdown.
Open this unit - Terminate a worker when its owning operation is canceled
Terminate the worker owned by a canceled operation while preserving caller cancellation and settling completion once.
Open this unit - Apply and prune a rate window using a controlled clock
Use an injected clock to prune a sliding admission window and evaluate its exact limit boundary without real-time sleeps.
Open this unit - Append committed records and recover only a torn final fragment
Append complete committed records and recover only a torn final fragment, rejecting corruption in earlier retained history.
Open this unit - Serve a local file after validating its decoded path and real target
Validate decoded paths and actual filesystem targets before serving bytes, keeping links from escaping the configured root.
Open this unit
