Skip to content

Instantly share code, notes, and snippets.

@tanepiper
Created January 30, 2011 01:45
Show Gist options
  • Select an option

  • Save tanepiper/802418 to your computer and use it in GitHub Desktop.

Select an option

Save tanepiper/802418 to your computer and use it in GitHub Desktop.
module.exports = (settings, db) ->
express = require "express"
app = express.createServer()
app.configure ->
app.set 'views', "views"
app.set "view engine", "jade"
app.use express.logger()
app.use express.bodyDecoder()
app.use express.cookieDecoder()
app.use app.router
app.use express.methodOverride()
app.use express.staticProvider "public"
app.use require('sesame')()
app.configure "development", ->
app.use express.errorHandler
dumpExceptions: yes
showStack: yes
app.configure "production", ->
app.use express.errorHandler()
app.use "/upload", require("#{__dirname}/controllers/express/FileUpload")
app.use "/", require("#{__dirname}/controllers/express/UserLogin")(settings, db)
app.listen 8080
Connect
500 TypeError: undefined is not a function
at CALL_NON_FUNCTION (native)
at Object.handle (/usr/local/lib/node/.npm/sesame/0.0.2/package/index.js:40:18)
at next (/usr/local/lib/node/.npm/connect/0.5.6/package/lib/connect/index.js:236:15)
at /usr/local/lib/node/.npm/connect/0.5.6/package/lib/connect/middleware/staticProvider.js:89:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment