-
-
Save jashkenas/802306 to your computer and use it in GitHub Desktop.
Revisions
-
jashkenas revised this gist
Jan 29, 2011 . 2 changed files with 9 additions and 38 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,27 +1,25 @@ require.paths.unshift __dirname express = require 'express' app = express.createServer() app.configure -> app.set 'views', '#{__dirname}/views' app.use express.logger() app.use express.bodyDecoder() app.use express.cookieDecoder() app.use app.router app.use express.methodOverride() app.use express.staticProvider '#{__dirname}/public' app.configure 'development', -> app.use express.errorHandler dumpExceptions: yes showStack: yes app.configure 'production', -> app.use express.errorHandler() app.use '/', (req, res, next) -> res.send 'Hello World ' + Date().toString() This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,27 +0,0 @@ -
tanepiper created this gist
Jan 29, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ require.paths.unshift('#{__dirname}') express = require 'express' app = express.createServer() app.configure( () -> app.set 'views', '#{__dirname}/views' app.use express.logger() app.use express.bodyDecoder() app.use express.cookieDecoder() app.use app.router app.use express.methodOverride() app.use express.staticProvider('#{__dirname}/public') ) app.configure 'development', () -> app.use express.errorHandler({ dumpExceptions: true showStack: true }) app.configure 'production', () -> app.use express.errorHandler() app.use '/', (req, res, next) -> res.send 'Hello World ' + Date().toString() app.listen 8080 This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ (function() { var app, express; require.paths.unshift('#{__dirname}'); express = require('express'); app = express.createServer(); app.configure(function() { app.set('views', '#{__dirname}/views'); app.use(express.logger()); app.use(express.bodyDecoder()); app.use(express.cookieDecoder()); app.use(app.router); app.use(express.methodOverride()); return app.use(express.staticProvider('#{__dirname}/public')); }); app.configure('development', function() {}); app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); app.configure('production', function() { return app.use(express.errorHandler()); }); app.use('/', function(req, res, next) { return res.send('Hello World ' + Date().toString()); }); app.listen(8080); }).call(this);