I have installed a node based lightweight web server https://www.npmjs.com/package/http-server in my droplet and trying to serve a directory with it.
This shows the output as -
Can you check if your firewall is active?
sudo ufw status
And run this command to show listening services:
sudo lsof -iTCP -sTCP:LISTEN -P