Hardware Reference
In-Depth Information
Solution
BeagleBone Black already has a couple of web servers running. This recipe shows how to
use the Node.js-based server.
Recipe 6.13
shows how to use
Apache
.
When you point your browser to
192.168.7.2
, you are using the Node.js web server The
web pages are served from
/var/lib/cloud9
. Add the HTML in
Example 6-1
to a file called
/var/lib/cloud9/test.html
, and then point your browser to
192.168.7.2:test.html
.
Example 6-1. A sample web page (test.html)
<!DOCTYPE html>
<html>
<body>
<h1>
My First Heading
</h1>
<p>
My first paragraph.
</p>
</body>
</html>
You will see the web page shown in
Figure 6-1
.