6
5 minute Tutorial
Richard van Nieuwenhoven edited this page 2015-03-22 15:39:12 +01:00

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