Created
May 6, 2011 23:36
-
-
Save bassdread/960005 to your computer and use it in GitHub Desktop.
Failing to render a page
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
var express = require('express'), | |
connect = require('connect'), | |
fs = require('fs'), | |
http = require('http'), | |
url = require('url'), | |
sys = require('sys'), | |
wwwdude = require('wwwdude'), | |
locker = require('../../Common/node/locker.js'), | |
lfs = require('../../Common/node/lfs.js'); | |
var app = express.createServer( | |
connect.bodyParser(), | |
connect.cookieParser(), | |
connect.session({secret : "locker"}) | |
); | |
app.get('/', function(req, res) { | |
res.writeHead(200, { 'Content-Type': 'text/html' }); | |
res.end("<html>Enter your personal last.fm app info that will be used to sync your data</html>"); | |
}); | |
var stdin = process.openStdin(); | |
stdin.setEncoding('utf8'); | |
stdin.on('data', function (chunk) { | |
var processInfo = JSON.parse(chunk); | |
locker.initClient(processInfo); | |
process.chdir(processInfo.workingDirectory); | |
lfs.readObjectFromFile('auth.json', function(newAuth) { | |
auth = newAuth; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment