Permalink
Browse files

added support for CoffeeScript controllers

  • Loading branch information...
antz29 committed Apr 7, 2012
1 parent 834c73b commit a1e71ee9b082fde9fd9f369279c6c030a089d946
Showing with 4 additions and 4 deletions.
  1. +1 −2 example/base.js
  2. +1 −1 example/controllers/index.js
  3. +2 −1 src/lib/base.coffee
View
@@ -7,5 +7,4 @@ var base = new Base({
port: 8000
});
-base.go()
-
+base.go()
@@ -2,4 +2,4 @@ exports.index = function(req,res,callback) {
callback({
'title' : 'Hello world!'
});
-}
+}
View
@@ -37,6 +37,7 @@ class Base extends EventEmitter
models: "/models",
public: "/public",
template_engine: "jqtpl",
+ core_language: "js",
port: 3000
})
@@ -99,7 +100,7 @@ class Base extends EventEmitter
callback null
controller: (callback) =>
- target = "#{@options.root}#{@options.controllers}/#{req.controller}.js"
+ target = "#{@options.root}#{@options.controllers}/#{req.controller}.#{@options.core_language}"
fs.stat target, (err) =>
if (err) then return callback(null)

0 comments on commit a1e71ee

Please sign in to comment.