home nodejitsu.com


Vote on HN

About the author

Name
Marak Squires
marak
marak
Location
New York, NY

About this article

Date Released:
Thursday, Jun 16 2011

Also by this author

  • resource reflection in flatiron
  • package json cheat sheet
  • npm cheatsheet
  • spawning hookio hooks
  • using nodejitsu for nko
  • top node module creators
  • 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
  • most influential github users by location
  • kyuri and prenup our node knockout entries

About nodejitsu

nodejitsu is a node.js application hosting company from new york city.

we are community leaders in the node.js project.

we build awesome open-source projects that you love and use.

Follow @nodejitsu

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!