diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ed42d01 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +npm_debug.log diff --git a/README.md b/README.md index d22badd..74c7a32 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,8 @@ Building portify * Make sure you have installed a usable build enviroment (gcc, make & co.) * Install Node.js (using your favourite package manager, but make sure it's newer than 0.8) * Clone the git repo (master branch) -* Go into the ./data/ directory and run npm install (This will fetch and compile all depenencies of portify) -* Try running the daemon by executing node app.js in the ./data/ folder +* `npm install` Install dependencies +* `npm start` Start the server * Open your favourite browser and go to localhost:3132 [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/mauimauer/portify/trend.png)](https://bitdeli.com/free "Bitdeli Badge") diff --git a/data/app.js b/data/app.js index 1543868..d6075c0 100644 --- a/data/app.js +++ b/data/app.js @@ -12,13 +12,14 @@ var app, io = require('socket.io'), TimeQueue = require('timequeue'); -console.log("portify 0.51"); +console.log("portify, version: " + process.env.npm_package_version); + if (typeof Proxy !== 'object' || typeof WeakMap !== 'function') { console.log("Starting without harmony"); express = require('express'); postField = "body"; app = express(); - server = http.createServer(app) + server = http.createServer(app); router = app; app.use(express.static(__dirname + '/content')); app.use (function(req, res, next) { @@ -276,7 +277,7 @@ router.post('/spotify/login', function(request, response, next){ response.send({ status: 400, message: "login failed.", error: err }); return; } - + console.log("Spotify Login success"); spotifySession = spotify; response.send({ status: 200, message: "login successful." }); @@ -448,8 +449,10 @@ if(appjs) { window.process = process; window.module = module; - function F12(e){ return e.keyIdentifier === 'F12' } - function Command_Option_J(e){ return e.keyCode === 74 && e.metaKey && e.altKey } + function F12(e){ return e.keyIdentifier === 'F12'; } + function Command_Option_J(e){ + return e.keyCode === 74 && e.metaKey && e.altKey; + } window.addEventListener('keydown', function(e){ if (F12(e) || Command_Option_J(e)) { @@ -461,4 +464,4 @@ if(appjs) { window.on('close', function(){ console.log("Window Closed"); }); -} \ No newline at end of file +} diff --git a/data/package.json b/data/package.json deleted file mode 100644 index 0b9973b..0000000 --- a/data/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "portify", - "description": "Moves your Spotify playlists to Google", - "version": "0.0.5", - "private": true, - "dependencies": { - "googleclientlogin": "*", - "spotify-web": "https://github.com/mauimauer/node-spotify-web/tarball/master", - "socket.io": "*", - "express": "*", - "superagent": "*", - "levenshtein": "*", - "timequeue": "*" - } -} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..8464f3c --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "portify", + "description": "Moves your Spotify playlists to Google", + "version": "0.0.6", + "private": true, + "dependencies": { + "spotify-web": "https://github.com/adammw/node-spotify-web/tarball/api-redesign/", + "socket.io": "~0.9.16", + "express": "~3.4.8", + "superagent": "~0.16.0", + "levenshtein": "~1.0.4", + "timequeue": "~0.2.2", + "googleapis": "~0.6.1" + } +} diff --git a/server.js b/server.js new file mode 100644 index 0000000..6e55ba7 --- /dev/null +++ b/server.js @@ -0,0 +1 @@ +require('./data/app')