Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated express and meryl examples.

  • Loading branch information...
commit 756cdf62bbed0708aae1f1386754b0322a4b5430 1 parent 243c54b
@mauricemach authored
Showing with 6 additions and 4 deletions.
  1. +5 −3 examples/express/app.coffee
  2. +1 −1  examples/meryl/app.coffee
View
8 examples/express/app.coffee
@@ -1,16 +1,18 @@
app = require('express').createServer()
-app.register '.coffee', require('coffeekup')
+coffeekup = require '../../src/coffeekup'
+
+app.register '.coffee', coffeekup
app.set 'view engine', 'coffee'
app.get '/', (req, res) ->
res.render 'index'
app.get '/login', (req, res) ->
- res.render 'login', locals: {a_local_var: 'local'}, context: {a_context_var: 'context'}
+ res.render 'login', foo: 'bar', locals: {ping: 'pong'}
app.get '/inline', (req, res) ->
- res.send require('coffeekup').render ->
+ res.send coffeekup.render ->
h1 'This is an inline template.'
app.listen 3000
View
2  examples/meryl/app.coffee
@@ -1,5 +1,5 @@
meryl = require 'meryl'
-coffeekup = require 'coffeekup'
+coffeekup = require '../../src/coffeekup'
meryl.h 'GET /', (req, resp) ->
people = ['bob', 'alice', 'meryl']
Please sign in to comment.
Something went wrong with that request. Please try again.