forked from wearefractal/slate
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Contra
committed
Feb 4, 2012
1 parent
8502bc4
commit 90a216e
Showing
3 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
slate = require 'slate' | ||
{join} = require 'path' | ||
|
||
process.argv = process.argv[2..] | ||
[folder, port] = process.argv | ||
throw 'Missing folder parameter' unless folder? | ||
folder = join process.cwd(), folder | ||
port ?= 8080 | ||
|
||
server = slate.create() | ||
server.root folder | ||
server.enable '404', 'mime', 'static' | ||
server.listen port | ||
|
||
console.log "Slate serving #{folder} on port #{port}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env node | ||
|
||
require('coffee-script'); | ||
module.exports = require('./slate.coffee'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters