Check your local runtime

Check the runtime and fixed app before the next exercise.

Where do you want to run the labs?

Local machine instructions selected. You can switch at any time.

Switching changes the instructions only. Stop any exercise server or container yourself before starting the other route. Both routes use the same files and completion marks.

YOUR TASK · LOCAL MACHINE

Check the local runtime and the fixed source before running the API.

Before you start

Node.js 24 and the fixed files from lab 02. Docker is not used on this route.

You’re finished when

Node.js is version 24, app.mjs parses, and all five tests pass.

Go to step 1 ↓

Do the exercise on your computer. This page provides instructions and saves completion marks; it does not run commands or check your files.

Follow these steps

  1. Terminal · extracted starter folder

    Open a terminal in the exercise folder

    Use the same extracted folder and fixed app from lab 02.

    How do I open a terminal in the right folder?

    Windows: open the extracted folder in File Explorer. Click the address bar, type powershell, and press Enter.

    VS Code: open the extracted folder with File → Open Folder, then choose Terminal → New Terminal.

    macOS or Linux: open Terminal and type cd followed by the extracted folder’s path. If the path contains spaces, put it in quotes.

    The terminal must be in the folder containing app.mjs and security.test.mjs. Commands below are entered in that terminal, not in the browser address bar.

    Check before continuing

    app.mjs and security.test.mjs are in the folder opened by your terminal.

  2. Terminal

    Check your Node.js runtime

    TERMINAL
    node --version
    Check before continuing

    The version begins with v24.

  3. Terminal

    Check that the app parses

    TERMINAL
    node --check app.mjs

    This checks JavaScript syntax without starting the server. It does not prove that the authorization rule works.

    Check before continuing

    The command returns to the prompt with no syntax error.

  4. Terminal

    Run the security tests

    TERMINAL
    node verify-lab.mjs fixed

    Keep this saved app and these unchanged tests together for the next labs. This route runs the source directly; it does not produce a container image.

    Check before continuing

    All 5 tests pass. If they fail, return to the fix in lab 02.

TRY WITHOUT COPYING · OPTIONAL

Separate the two ideas

For your chosen route, explain the difference between testing the app and checking the runtime. Can an app pass its tests while running with more privileges than it needs?

Compare your reasoning

Yes. Passing access-control tests does not prove the process has limited operating-system privileges. Runtime checks answer a different question.

Explain your answer aloud or write a sentence before opening the explanation. This does not change your completion record.

A QUICK CHECK

What should happen if an access-control regression test fails?

Choose an answer

Done with this one?

Marking complete is your own record.

Confirm your results

Confirm both results before marking this lab complete.