Skip to content

Commit

Permalink
Update the example code in server.js
Browse files Browse the repository at this point in the history
#14
1. remove the express.createServer()
2. change connect.multipart()
3. remove the app.address()
  • Loading branch information
meteormatt committed Dec 2, 2013
1 parent 49c93b7 commit 690644a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
.idea
6 changes: 3 additions & 3 deletions examples/server.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
var express = require("express"),
app = express.createServer();
app = express();

// The bodyParser, cookieParser, and session middlewares are required for express-persona
// If you don't want to use express' session middle, you could also use `client-sessions`
app.use(express.logger())
.use(express.static(__dirname))
.use(express.bodyParser())
.use(express.urlencoded())
.use(express.json())
.use(express.cookieParser())
.use(express.session({
secret: "mozillapersona"
Expand All @@ -19,7 +20,6 @@ require("../index.js")(app, {
});

app.listen(3000, function() {
var addy = app.address();
console.log('HTTP server started on http://localhost:3000');
console.log('Press Ctrl+C to stop');
});

0 comments on commit 690644a

Please sign in to comment.