-
-
Save jashkenas/802306 to your computer and use it in GitHub Desktop.
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 characters
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() | |
app.listen 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment