Command Line Usage

Once the gem is installed the `serve` command will be available from the command prompt. To launch Serve, just type the command and press enter:

serve

This will launch a simple web server which you can access from any web browser at the following address:

http://localhost:4000

Once the server is going it will output a running log of its activity. To stop the server at any time, type CTRL+C at the command prompt. By default the serve command serves up files from the current directory. To change this behavior, `cd` to the appropriate directory before starting serve or pass the directory as the final parameter to the command:

serve my-project

The `serve` command automatically binds to 0.0.0.0 (localhost) and uses port 4000 by default. To serve files over a different IP (that is bound to your computer) or port specify those options on the command line:

serve 4000               # a custom port
serve 192.168.1.6        # a custom IP
serve 192.168.1.6:4000   # a custom IP and port

For your convenience if the file "script/server" exists in the current directory the serve command will start that instead of launching a Ruby Web server. You can specify the environment that you want to start the server with as an option on the command line:

serve production         # start script/server in production mode

Sub-Commands