Skip to content

Instantly share code, notes, and snippets.

@ntanya
Created June 7, 2012 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ntanya/2890386 to your computer and use it in GitHub Desktop.
Save ntanya/2890386 to your computer and use it in GitHub Desktop.
file upload
var express = require('express');
var fs = require('fs'); // we will need it for file uploads
var app = module.exports = express.createServer();
app.configure(function(){
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.static(__dirname + '/public'));
});
app.configure('development', function(){
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
});
app.configure('production', function(){
app.use(express.errorHandler());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment