Serve A Local Directory As A Web Site With npx browser-sync
You can serve a local directory as a web site by running this inside it:
npx browser-sync start --server --files "./*.html" --no-open --no-notify --directory
This will only server html files. Serving different ones is left as an exercise to the reader.
The site is served at both:
Use ngrok if you need to show it to folks externally by running this (doesn't have to be in the same directory):
ngrok http 3000
There's also a UI that gives you some details at:
npx installed which should come with node.
It'll install browser-sync the first time you run it if it's not already there.