The examples in the course are designed to work with specific origins. Students should set up two local web servers handling requests to different origins. For simplicity, we recommend that the web servers run locally. The next picture describes the origins students should install.
In the picture, the local IP address hosts two servers (one at port
and other at port
9090). We describe how to install the servers in Windows
by using Mongoose, a very simple and easy to use web server. Although the
instructions are for Windows, Mongoose is cross-platform and works in Apple OS X
and Linux. In this light, the installation steps should be similar.
WebsiteB, which contains the contents for Alice and Bob, respectively. To fetch the content, you can clone the repository:
git clone email@example.com:russo/eci2015-code.gitor
git clone https://firstname.lastname@example.org/russo/eci2015-code.gitAlternatively, you can simply visit the web page of the repository.
In those directories, you will find the executable
which contains the Mongoose web server. If you do not trust this executable,
you can download it from the Mongoose web
cite instead. Copy these directories to
your local machine.
Edit the file
mongoose.conf in both folders and adjust lines
document_root C:\Users\Alejandro\Documents\ECI2015\Website A and
document_root C:\Users\Alejandro\Documents\ECI2015\Website B to reflect
the path where you copied the folders.
We need to map
bob.com to the local host. For
that, you can download the free program
HostMan, which edits the host file in
Windows. You should map your local IP to
shown in the picture (remember that your local private IP address might use a
mongoose-free-5.6in the folder
Website A, your should see the greeting from Alice.
Similarly, if you execute
mongoose-free-5.6 in the folder
your should see the greeting from Bob.
You are done!