BBB Debian Distribution Web Page Questions

Hello,

I have a BeagleBone Black running the Debian distribution. I am looking at the web page setup and the interface with node.js in preparation to set up my own web page that will display some information that I am reading over a serial port. It appears that Apache is running as the web server as I see apache2 processes. I understand that node.js can be its own web server, so I am a little perplexed why apache is used in addition to node.js and how node.js works with apache.

I also don’t see the web pages in the normal /var/www/ location and am wondering where they are located.

Thanks

Port 80: nodejs (some where in the bone101 dir's..)
Port 8080: apache (/var/www/)

Regards,

> Hello,
>
> I have a BeagleBone Black running the Debian distribution. I am looking
at
> the web page setup and the interface with node.js in preparation to set
up
> my own web page that will display some information that I am reading
over a
> serial port. It appears that Apache is running as the web server as I
see
> apache2 processes. I understand that node.js can be its own web server,
so
> I am a little perplexed why apache is used in addition to node.js and how
> node.js works with apache.
>
> I also don't see the web pages in the normal /var/www/ location and am
> wondering where they are located.

Port 80: nodejs (some where in the bone101 dir's..)

The root is currently /var/lib/cloud9/.

You do not have to have Apache2 on the board if you do not want to. These images are demo images, to show the capabilities of the hardware.

Nodejs is actually a better candidate for a “web server” versus Apache since most traditional web servers run multilthreaded. Nodejs runs one thread per process. Since the BBB is a single core processor, multithreaded could cause performance hits due to context switching. But, do not take my word on this matter, feel free to google, and find the same information I did :slight_smile:

Another upside to Nodejs, atleast in the context of the BBB, is that you can put together a very small image, and still do ALOT. I’ve built my own Nodejs image with a few standard Debian(linux) tools, plus Express, and socket.io that is less than 200M in size. 191M to be exact. Thanks to Robert’s barefs rootfs which weighs in at around 70-75M.