abhshkdz / HackFlowy

:notebook: Workflowy clone, built using Backbone.js & Socket.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot GET /

MaxPleaner opened this issue · comments

I tried running this with a static http server (python -m SimpleHTTPServer 3000) and was able to see the index file, however it was in 'offline' mode and was failing to connect the Tasks API on port 3000.

I tried running with node server.js but that's where I get the error in this issue's header.

I got the same error on heroku. Have been trying to fix, but unsuccessful.

I also tried making an express get '/' route which rendered part of the index page. None of the app assets (including scripts and styles) were loaded though.

$ node --version
v0.10.37
$ npm --version
n3.5.3
$ more /etc/*-release | grep DISTRIB_DESCRIPTION
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"
$ uname -r
3.19.0-49-generic

For the static server, that's expected behaviour. Offline mode means you haven't got a server running and it's using localstorage not a server database. If you find the message confusing, do you have an idea for an improvement?

For running the server, I need error outputs to help. Can you post error output from the console and from the browser console too?

Oh it looks like this might be because I merged gh-pages into master by accident. Sorry about that. Should be fixed soon. In the meantime if you grab wassname/HackFlowy/master it should work when running node server.js?

Should be fixed in the main repo now, feel free to reopen this with more info otherwise.

@wassname theres some crazy stuff going on when node server.js is run locally and it's not working. The server seems to be making some repetetive query. Do you mind me asking if you tried cloning the repo, running sudo npm install and bower install, then node server.js?

Here'es the query which is run repeatedly upon opening localhost:3000;

Executing (default): SELECT `id`, `content`, `parentId`, `isCompleted`, `priority`, `isFolded`, `createdAt`, `updatedAt` FROM `Tasks` AS `Tasks` WHERE `Tasks`.`id` = '981b915d-16c4-4d72-9987-722db2b9dcd7';
Executing (default): UPDATE `Tasks` SET `priority`=787,`updatedAt`='2016-02-02 08:17:21.000 +00:00' WHERE `id` = '95cafe50-993a-41c2-8395-f36b866d8bb1'
{ view: 'put(\'/tasks/:id)',
  id: '8ab6bb2a-d64e-43af-881d-5f9c28bb9fa1',
  body: 
   { id: '8ab6bb2a-d64e-43af-881d-5f9c28bb9fa1',
     content: '',
     parentId: '00000000-0000-0000-0000-000000000000',
     isCompleted: false,
     priority: 790,
     isFolded: false,
     createdAt: '2016-02-02T08:17:01.000Z',
     updatedAt: '2016-02-02T08:17:01.000Z' } }

txt

@wassname if you want to see a 1-click Heroku deploy I just launched, view https://maxp-hackflowy1.herokuapp.com/

you will see that it freezes.

Hi yeah I have tried it worked for me. I get the same output, it's just some console.log(x,y) from server.js. Feel free to make it better and a make PR.

Nice, that herokuapp show whats going on. If you go to https://maxp-hackflowy1.herokuapp.com/tasks it gives an empty json array, so there is nothing in the server DB. In that case we might want to look at the deploy logs to see if there where errors in DB population.

Also on the frontend it can't find a few dependencies. Did bower install work I wonder. Hmmm.

This is what it should look like: http://abhshkdz.github.io/HackFlowy

I'll try deploying from scratch again and get back to you. it might not be until tomorrow though as it's getting late in Australasia.

thanks for testing it by the way, I appreciate it and it will iron out any problems. I do want to get deploy working smoothly so dev's can easily jump in and contribute.

Solved, I had a look at the build log on heroku and the problems showed up. It was:

  • bower not being called during heroku deploy, fixed by adding it to package.json postinstall hook
    • in the production env postgres didn't like the id's of the demo data, this was shown in the build log, fixed this too

I also removed the that verbose output, so it doesn't look crazy on startup

Works for me now. Hopefully it works for you now?