This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.configure(function() { | |
app.set('views', __dirname + '/views'); | |
app.set('view engine', 'jade'); | |
app.use(express.cookieParser()); | |
//↓sessionの前に書かないと、最初のアクセスでundefinedが返ってきました。 | |
app.use(express.csrf()); | |
app.use(express.session({ secret: 'secret goes here' })); | |
app.use(express.bodyParser()); | |
app.use(app.router); | |
app.use(express.static(__dirname + '/public')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#perse xml | |
require 'rexml/document' | |
doc = REXML::Document.new(response[:body]) | |
doc.elements['response/result'].text | |
#guess encording | |
require 'nkf' | |
NKF.guess(response[:body]) |
NewerOlder