Skip to content

Commit

Permalink
changes host mode to dirmode
Browse files Browse the repository at this point in the history
  • Loading branch information
sintaxi committed Mar 5, 2013
1 parent 410f01c commit fb14c43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Harp can be used as a library or as a command line utility.

-s, --server [port] start a server for harp app (dynamically generates assets)
-c, --compile [output-dir] compiles static assets. (relative to project-path)
-d, --dir-mode [port] host a directory of harp apps (available at http://harp.nu)
-d, --dirmode [port] host a directory of harp apps (available at http://harp.nu)

Start the server in root of your application by running...

Expand Down
8 changes: 4 additions & 4 deletions bin/harp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ program
.usage('[project-path] [options]')
.option('-s, --server [port]', 'start a server for harp app (dynamically generates assets)')
.option('-c, --compile [output-path]', 'compiles static assets. (relative to project-path)')
.option('-h, --host [port]', 'hosts a folder of harp apps.')
.option('-d, --dirmode [port]', 'hosts a directory of harp apps.')
.parse(process.argv)

if(program.args.length > 0){
Expand All @@ -27,11 +27,11 @@ if(program.server){
harp.server(projectPath, { port: port }, function(){
console.log("harp is listening on port", port)
})
}else if(program.host){
}else if(program.dirmode){
var appsPath = projectPath
var port = program.host === true
var port = program.dirmode === true
? 9966
: program.host
: program.dirmode
harp.server(appsPath, { port: port, hostMode: true }, function(){
console.log("harp is hosting apps on port", port)
})
Expand Down

0 comments on commit fb14c43

Please sign in to comment.