How to configure node.js

So, I understand that the BBB has this slick web server called node.js, which I guess is the default running web server even though Apache is also installed. I would like to change the index.html file and just generally play around with node.js, but I can’t figure out where its files are. My board is running Debian 7.4 (I guess that’s Wheezy?). One post on this forum suggested that index.html is in /usr/share/bone101, but that folder doesn’t exist on my system.

TIA, Doug

The default Apache web server directory is usually something like /var/www/html.

Apache can “proxy” node.js servers, which is a good idea for security reasons.

But, you don’t need to involve Apache at all just to experiment. You can build a simple web server with just a few lines of Node.js code.
There are tons of online tutorials on how to do this. And some very good books.

You didn’t say how much experience you have with Javascript. I will inject my opinion here, you need to read some basics of ES5, and
in particular the “var” keyword and a concept called “hoisting”. Then, jettison that and read about ES6 and never use var again.
But you will understand what is going with var when you see it in legacy code.

A very good Javascript (ES6) book which has a brief chapter on Node: “Learning Javascript” by Ethan Brown.

Upgrade your board to the latest recommended image. Also, I would also recommend upgrading to the newest Node:

https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

Now the above may totally wreck the Beaglebone Node packages. But you can always go back if you want to use the Beaglebone specific stuff.
Then begin your Node.js adventure. If you want to see an example project here is one of mine:

https://www.hackster.io/Greg-R/beaglebone-green-wireless-irrigation-control-ce7c4b

Node.js+ES6 is really fantastic. A little bewildering at first, because there is some much activity out there it can be hard to determine where to start.

Regards,
Greg