Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.