Simple HTTP server in Java using only Java SE API

Since Java SE 6, there’s a builtin HTTP server in Sun Oracle JRE. The com.sun.net.httpserver package summary outlines the involved classes and contains examples. Here’s a kickoff example copypasted from their docs (to all people trying to edit it nonetheless, because it’s an ugly piece of code, please don’t, this is a copy paste, not mine, moreover you should never edit quotations … Read more

http-server command not found

You may not have your npm binaries in PATH. Make sure that your npm binaries are in path by running echo $PATH. You should see, somewhere in the printed output, something like: /home/bob/.npm-packages/bin is the directory where my npm binaries are installed whenever I run npm -g install whatever. If you don’t see something like that, read Fixing npm permissions which … Read more