Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
node script, less and cs dependencies
- Loading branch information
guybedford
authored and
guybedford
committed
Nov 28, 2012
1 parent
7207e0c
commit aff6540
Showing
4 changed files
with
56 additions
and
3 deletions.
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
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
File renamed without changes.
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,50 @@ | ||
connect = require 'connect' | ||
zest = require 'zest-server' | ||
|
||
### | ||
* ZestJS NodeJS Server Example | ||
* | ||
* | ||
* For more info, and configuration options such as how to alter | ||
* client code paths, and disable Zest Server file serving, see: | ||
* http://zestjs.org/docs#Using%20Zest%20Server%20within%20a%20NodeJS%20Application | ||
* | ||
### | ||
|
||
|
||
app = connect() | ||
|
||
zest.init 'dev', -> | ||
app.use zest.server | ||
app.listen 8080 | ||
|
||
|
||
|
||
### | ||
# Native ZestJS example: | ||
zest = require 'zest-server' | ||
http = require 'http' | ||
zest.init 'dev', -> | ||
zest.require ['zoe'], (zoe) -> | ||
handler = zoe.fn 'ASYNC' | ||
# custom handler - if it doesn't call 'next' | ||
# then zest won't do routing | ||
handler.on (req, res, next) -> | ||
if someCondition | ||
return next(); | ||
# custom render call | ||
zest.renderPage | ||
title: 'Page Title' | ||
structure: 'my/component/id' | ||
options: {} | ||
handler.on zest.server | ||
http.createServer(handler).listen 8085 | ||
### |