Dynamically serve coffee script as .js files
CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
index.coffee
package.json

README.md

coffeepot

Connect/Express middleware to dynamically serve coffee files as js

use connect-assets?

connect-assets does everything this module does and more. I couldn't get it to work. See this ticket.

example

app.coffee

express = require 'express'
coffeepot = require 'coffeepot'

app = express.createServer()

app.configure ->
  publicDir = __dirname + "/public"
  app.use coffeepot publicDir
  app.use express.static publicDir

app.listen 3000

public/js/test.coffee

console.log "HI"

Now if you request http://localhost:3000/js/test.js it will resolve.