Skip to content
Richard van Nieuwenhoven edited this page Mar 22, 2015 · 6 revisions

You'll need Linux or Mac OS, Git, Maven and a JDK installed in order to be able to continue.

  1. Grab the latest nanohttpd

git clone https://github.com/NanoHttpd/nanohttpd.git

  1. This will create a directory 'nanohttpd' in your current directory. Switch to it

cd nanohttpd

  1. Build the source.

mvn package

  1. Run the nanohttpd SimpleWebServer

java -cp webserver/target/nanohttpd-webserver-2.1.0-jar-with-dependencies.jar fi.iki.elonen.SimpleWebServer

  1. Browse it

http://localhost:8080

You can skip 1 to 3 if you download the jar from central: nanohttpd-webserver-2.1.1-jar-with-dependencies.jar

Clone this wiki locally