[Groonga-commit] droonga/express-droonga at 1a62875 [master] Remove HTTP server application.

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Mar 28 15:58:18 JST 2014


YUKI Hiroshi	2014-03-28 15:58:18 +0900 (Fri, 28 Mar 2014)

  New Revision: 1a62875cf600e18fe74a25fec65ec10085d1a998
  https://github.com/droonga/express-droonga/commit/1a62875cf600e18fe74a25fec65ec10085d1a998

  Message:
    Remove HTTP server application.
    
    Because it should be hosted in another project "droonga-http-server"

  Removed files:
    application.js
    bin/droonga-http-server
  Modified files:
    package.json

  Deleted: application.js (+0 -70) 100755
===================================================================
--- application.js    2014-03-28 15:34:20 +0900 (d5d8ba3)
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env node
-
-var express = require('express'),
-    droonga = require('./index'),
-    cache = require('./lib/response-cache'),
-    responseTime = require('response-time'),
-    http = require('http'),
-    options = require('commander');
-
-var version = require('./package.json').version;
-
-options
-  .version(version)
-  .option('--port <port>', 'Port number', parseInt, 13000)
-  .option('--receive-host-name <name>',
-          'Host name of the protocol adapter. ' +
-            'It must be resolvable by Droonga engine.',
-          '127.0.0.1')
-  .option('--droonga-engine-host-name <name>', 'Host name of Droonga engine',
-          '127.0.0.1')
-  .option('--droonga-engine-port <port>', 'Port number of Droonga engine',
-          parseInt, 24224)
-  .option('--default-dataset <dataset>', 'The default dataset',
-          'Droonga')
-  .option('--enable-logging', 'Enable logging to the standard output')
-  .option('--cache-size <size>', 'The max number of cached requests',
-          parseInt, 100)
-  .parse(process.argv);
-
-var application = express();
-var server = http.createServer(application);
-
-var MemoryStore = express.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({
-    secret: 'secret key',
-    store:  sessionStore
-  }));
-  application.use(responseTime());
-  if (options.cacheSize > 0) {
-    application.use(cache({
-      size: options.cacheSize,
-      rules: [
-        { regex: /./ }
-      ]
-    }));
-  }
-});
-
-droonga.initialize(application, {
-  prefix: '',
-  defaultDataset: options.defaultDataset,
-  server: server,
-  sessionStore: sessionStore, // this is required to share session information HTTP APIs
-  receiveHostName: options.receiveHostName,
-  hostName: options.droongaEngineHostName,
-  port: options.droongaEnginePort,
-  plugins: [
-    droonga.API_REST,
-    droonga.API_GROONGA,
-    droonga.API_DROONGA
-  ]
-});
-
-server.listen(options.port);

  Deleted: bin/droonga-http-server (+0 -9) 100755
===================================================================
--- bin/droonga-http-server    2014-03-28 15:34:20 +0900 (8afbff3)
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-set -e
-set -u
-
-root_dir=$(cd $(dirname $0)/.. && pwd)
-cd $root_dir
-
-exec node application.js "$@"

  Modified: package.json (+1 -1)
===================================================================
--- package.json    2014-03-28 15:34:20 +0900 (f0bf88d)
+++ package.json    2014-03-28 15:58:18 +0900 (e0b056d)
@@ -20,7 +20,6 @@
   "license": "MIT",
   "dependencies": {
     "connect": "*",
-    "express": ">=3.0",
     "fluent-logger": "*",
     "inflection": "*",
     "jade": "*",
@@ -32,6 +31,7 @@
     "response-time": "*"
   },
   "devDependencies": {
+    "express": ">=3.0",
     "chai": "*",
     "jsdeferred": "*",
     "mocha": "*",
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index