     @options
 
   exec: (command = argv._[0]) ->
-    return help() unless @[command]
+    if not command
+      command = 'server'
+    return @help() unless @[command]
     @[command]()
     switch command
       when 'build' then console.log 'Built application'

wrench   = require 'wrench'

Hem      = require 'hem'

help = ->
  optimist.showHelp()
  process.exit()

argv = optimist.usage([
  ' Usage: hem COMMAND',


    @readConfig app.settings.env

    app.run = (cb) ->
      app.listen app.settings.port, ->
        console.log "up & running @ http://localhost:#{app.settings.port}"
        if cb
          cb()
      app

    app

  server: ->
    app = @createServer()
    app.run ->
      if process.platform == 'darwin'
        child.exec "open http://localhost:#{app.settings.port}", -> return

  help: ->
    optimist.showHelp()
    process.exit()

  readConfig: (config = 'defaults') ->
    configPath = path.join process.cwd(), @options.configPath, config
