Navigation Menu

Skip to content

Commit

Permalink
Use separate middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 21, 2014
1 parent ddb6d0c commit 93df82c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bin/droonga-http-server
Expand Up @@ -2,6 +2,8 @@
// -*- js -*-

var express = require('express'),
cookieParser = require('cookie-parser'),
session = require('express-session'),
droonga = require('express-droonga'),
responseTime = require('response-time'),
http = require('http'),
Expand Down Expand Up @@ -36,14 +38,14 @@ options
var application = express();
var server = http.createServer(application);

var MemoryStore = express.session.MemoryStore;
var MemoryStore = session.MemoryStore;
var sessionStore = new MemoryStore();
application.configure(function() {
if (options.enableLogging) {
application.use(express.logger());
}
application.use(express.cookieParser('secret key'));
application.use(express.session({
application.use(cookieParser('secret key'));
application.use(session({
secret: 'secret key',
store: sessionStore
}));
Expand Down
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -19,9 +19,11 @@
},
"license": "MIT",
"dependencies": {
"cookie-parser": "*",
"commander": "*",
"express": ">=3.0",
"express-droonga": "*",
"express-session": "*",
"response-time": "*"
},
"bin": {
Expand Down

0 comments on commit 93df82c

Please sign in to comment.