Working with Web Services, linux fundamentals

hello i am unsure about question “Find a way to start a simple HTTP server inside Pwnbox or your local VM using “npm”. Submit the command that starts the web server on port 8080 (use the short argument to specify the port number).”
i tried …
npm install -g http-server; server-http -p 8080
i get a response ideal tree lib

hi, I have the same problem, i tried this but it doesn’t seem to be the answer :
npm exec http-server – -p 8080
then i have :
Starting up http-server, serving ./

http-server version: 14.1.1

http-server settings:
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none

Available on:
http://127.0.0.1:8080
http://192.168.1.19:8080
Hit CTRL-C to stop the server

install http-server globally using npm
then you’ll be able to use http-server command without ‘npm exec’

It’s confusing…
But the answer is actually

http-server -p 8080