home nodejitsu.com

about the author

Name:
Marak Squires
Github:
marak
Twitter:
marak
Location:
New York, NY

about this article

Date Released:
Thursday, Jun 16 2011

also by this author

  • hiring open source developers
  • building an anonymous cloud database
  • fault tolerant applications in nodejs
  • package json cheat sheet
  • npm cheatsheet
  • spawning hookio hooks
  • hookio video tutorials
  • using nodejitsu for nko
  • top node module creators
  • getting refunds on open source projects
  • hiring systems engineer
  • ibm doesnt care about nodejs people
  • javascript trampoline party
  • nodejs training sessions
  • intern at nodejitsu
  • the west coast hack haus
  • ten node apps that need to exist
  • most active nodejs users
  • sessions and cookies in node
  • sending emails in node
  • create nodejs web services in one line
  • kyuri and prenup our node knockout entries

about nodejitsu

nodejitsu is a node.js application hosting and martial arts training company.

we are evangelists and community leaders in the node.js project.

we build awesome open-source projects and keep your node.js apps running on our node.js hosting platform.

http-server, a command-line http server

http-server is a simple, zero-configuration command-line http server. It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development, and learning.


Installation:

Installation is via npm. If you don't have npm yet:

 curl http://npmjs.org/install.sh | sh

Once you have npm:

 npm install http-server -g

This will install http-server globally so that it may be run from the command line.

Usage:

 http-server [path] [options]

The entire /mypath tree will now be available at http://localhost:8080/.

Available Options:

-p Port to listen for connections on (defaults to 8080)

-a Address to bind to (defaults to 'localhost')

-i Display AutoIndex (defaults to 'True')

-s or --silent In silent mode, log messages aren't logged to the console.

-h or --help Displays a list of commands and exits.

Now let's get hacking!