Skip to content

Instantly share code, notes, and snippets.

@mkuklis
Created October 17, 2011 02:23
Show Gist options
  • Save mkuklis/1291808 to your computer and use it in GitHub Desktop.
Save mkuklis/1291808 to your computer and use it in GitHub Desktop.
express + jade + stylus + coffeescript
express = require 'express'
stylus = require 'stylus'
app = express.createServer()
# stylus
app.use stylus.middleware {
debug: true,
src: __dirname + '/public',
dest: __dirname + '/public',
compile: (str) ->
stylus(str).set 'compress', true
}
app.use express.static(__dirname + '/public')
app.set 'views', __dirname + '/views'
app.set 'view options', {layout: false}
app.get '/', (req, res) ->
res.render 'index.jade'
app.listen 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment