Skip to content

Instantly share code, notes, and snippets.

@bassdread
Created May 6, 2011 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bassdread/960005 to your computer and use it in GitHub Desktop.
Save bassdread/960005 to your computer and use it in GitHub Desktop.
Failing to render a page
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