Skip to content
gklopper edited this page Sep 14, 2010 · 36 revisions

Download and Install

First download the zip file from microserver-1.0.zip

Unzip the file on your local computer, this will create a folder called microserver

Starting the Microserver

Open a command line terminal and change directory into the microserver folder.

In the terminal type the command java -jar microserver you should see text something like

2010-07-16 11:28:39.564:INFO::Started SocketConnector@0.0.0.0:8080 

The local server is now ready.

(If you want to stop the server type Ctrl+C)

Viewing the component

Open a web browser and go to the url http://localhost:8080/article link. You should see a page which looks like a page on guardian.co.uk

About half way down the page on the right hand side you should see a component that looks like …

This is your component.

Editing the component

In the microserver folder there is a file called config.properties and a file called list-component.html

Open the file list-component.html and edit the line
<h3>Heading of the component</h3>
to read
<h3>Edited heading</h3>

Now take the absolute URL of the file list-component.html.

Absolute URLs for files look something like the following..

Linux file:///home/user/microserver/list-component.html
Windows file:///C:/Documents%20and%20Settings/user/microserver/list-component.html

Open the file config.properties and change the following line
componentUrl=http://github.com/gklopper/microserver/raw/master/examples/promo/list-component.html
to read
componentUrl=file:///home/user/microserver/list-component.html (use your own file url)

Make sure both files are saved and refresh the page http://localhost:8080/article, your component should have changed the heading.

Clone this wiki locally