Yoji Shidara
null+****@clear*****
Thu Aug 29 12:59:38 JST 2013
Yoji Shidara 2013-08-29 12:59:38 +0900 (Thu, 29 Aug 2013) New Revision: 7e173fe8de5613ebdfaf7a86f2d8e109c4593d17 https://github.com/droonga/droonga.org/commit/7e173fe8de5613ebdfaf7a86f2d8e109c4593d17 Merged 5fadeb3: Merge branch 'setup-on-cloud' into gh-pages Message: Show full version of revised frontend.js Modified files: tutorial/index.md Modified: tutorial/index.md (+16 -1) =================================================================== --- tutorial/index.md 2013-08-29 12:59:01 +0900 (dad708f) +++ tutorial/index.md 2013-08-29 12:59:38 +0900 (2ff045a) @@ -378,7 +378,22 @@ index.html: TODO: 'search' とそのパラメータについて、REST なリクエストとの関連性について書く -では、この `index.html` を frontend でホストできるようにするため、`frontend.js` の末尾に以下を追加します。 +では、この `index.html` を frontend でホストできるようにするため、`frontend.js` を以下のように書き換えます。 + +frontend.js: + + var express = require('express'), + droonga = require('express-droonga'); + + var application = express(); + var server = require('http').createServer(application); + server.listen(3000); // the port to communicate with clients + + application.droonga({ + prefix: '/droonga', + tag: 'droonga', + server: server // this is required to initialize Socket.IO API! + }); application.get('/', function(req, res) { res.sendfile(__dirname + '/index.html'); -------------- next part -------------- HTML����������������������������...Download