NanoHttpd / nanohttpd

Tiny, easily embeddable HTTP server in Java.
http://nanohttpd.org
BSD 3-Clause "New" or "Revised" License
6.96k stars 1.7k forks source link

Investigate turn-key install of webserver #32

Open psh opened 11 years ago

psh commented 11 years ago

What is needed to create a Debian .deb package for install using apt-get?

Can a turn-key install be created that installs and serves files from a fixed location?

Can an install of NanoHttpd be released as a binary for linux platforms?

Can an install of NanoHttpd be released as a binary for Mac / Windows platforms?

psh commented 11 years ago

Other thoughts - running the server

java -classpath webserver/target/nanohttpd-webserver-2.0.1.jar:core/target/nanohttpd-2.0.1 fi.iki.elonen.SimpleWebServer -p 8080

Be sure to checkout gh-pages branch

The server prints a lot to the console while running - production code ought to be "quieter".

Need to create a file in /etc/init.d to start and stop the server, modeled on tomcat6.

The .deb file should contain JAR files, and the gh-pages.

The "server runner" code needs to just start the class, not wait around for a key to be pressed.

psh commented 11 years ago

Note

In tests, on Ubuntu, NanoHttpd quite happily self-hosts its own website!

ritchieGitHub commented 9 years ago

There are maven plugins that can do that for use. I will dig them out