
Intel Galileo Networking Cookbook
By :

In this recipe, we are going to use Intel XDK and Node.js to run a simple web server on the Galileo board. Node.js is a server-side framework written in JavaScript, which is widely used around the world for server applications. Luckily for us, the Galileo board is powerful enough to run Node.js applications, and this is what we will do in this recipe.
Before we can code our server, we need to create a new project or application in the Intel XDK software. This will allow us to write code inside XDK and upload it to the board. Since we will write all the code from scratch, we can create a blank project, as shown here:
We are now going to run a simple web server on the Galileo board. This simple server will always answer Hello World when we send a request to it. This is the complete code for this recipe:
// Required modules var http = require('http'); // Configure our HTTP server to respond with Hello World to all requests...
Change the font size
Change margin width
Change background colour