Instead I ran a simple server called "http-server" (https://www.npmjs.com/package/http-server) and used
http-server /path/to/index -a 192.xxx.xx.xx -p 3000
Somehow my instructor managed to do it at localhost but never mind that now. If you are stuck here as I was go to VMware network settings and select custom VMnet1 as a network adapter. Then run ipconfig on the host and get the VMnet1 ip address and connect to it in your browser at 192.xxx.xx.xx:3000 and it should work.
Hopefully this helps but if anyone knows how on the great green earth to get this at localhost please let me know.
EDIT ONE:
Using VMnet1 (host only) settings will not give the server access to the internet but doing the same thing with VMnet8 (NAT) will work better.
EDIT TWO:
See Express as well for essentially the same method but with javascript. https://www.npmjs.com/package/express
- create index.js file with
var express = require('express') var app = express() app.get('/', function (req, res) { res.send('Hello World') }) app.listen(3000)
Run
nodejs index.js
on the server OR the way it is called in the Express documentation- go to servers ip address at port 3000 in host browser.