Closed vsivsi closed 10 years ago
Solved. Ugh. Am I the only one who finds the block of non-functional main.js "code" displayed in the Hoodie todo app to be a wee bit confusing (at 2:30am when just trying to get one last thing to work?)
So yeah, for this test, I had updated the "main.js" in the index.html, but not the actual main.js in the assets folder. Call it too much time messing about in JSFiddle, or maybe just well past bedtime. Either way, all was clear as soon as I sat at my keyboard this morning. Thanks for Punk, it seems to work just fine.
Yep, late night coding plus code snippets that aren't actually run is a recipe for frustration.
Let us know how you get on with the reactive remake of the todos. /cc @alanshaw
On Tue, Dec 3, 2013 at 9:01 PM, Vaughn Iverson notifications@github.comwrote:
Solved. Ugh. Am I the only one who finds the block of non-functional main.js "code" displayed in the Hoodie todo app to be a wee bit confusing (at 2:30am when just trying to get one last thing to work?)
So yeah, for this test, I had updated the "main.js" in the index.html, but not the actual main.js in the assets folder. Call it too much time messing about in JSFiddle, or maybe just well past bedtime. Either, all was clear as soon as I sat at my keyboard this morning. Thanks for Punk, it seems to work just fine.
— Reply to this email directly or view it on GitHubhttps://github.com/olizilla/hoodie-plugin-punk/issues/4#issuecomment-29750860 .
Oli Evans http://oli.zilla.org.uk
Hi, totally new to Hoodie (but who isn't?) and I've been trying out a couple of plug-ins and am stuck on this one. Here's my setup: I'm trying to make a r(e)active + punk mashup of the hoodie_todos playground app, without any user/email stuff.
So I create the project as:
Then I use this for my
www/index.html
(stripping out the User signing stuff, and substituting in Ractive template and Punk store logic) :Then I run
hoodie start
and promising things happen, including seeing things like this in the console:And indeed, when I pull up the page, the todo sample seems to work, I can add items and they survive page reloads, etc. But, if I load the page in two separate browsers (say Safari and Firefox) they each work, but they don't communicate through the backend. And in fact, shutting the whole thing down and restarting everything causes all of the todos to be dropped. I know it's not the Ractive plugin, because that aspect of this works fine with the normal/default user store stuff baked in. It was only when I added Punk and stripped out all of the User/Auth stuff that persisting to the backend ceased. The above log leads me to believe that Punk is in fact working, kind of. I've tried browsing into futon i.e.
/_api/_utils
and I can see ahoodie-plugin-punk
database, but there are no documents in it.One hint: This line of code does nothing:
I would expect this to cause a single wtf? todo to be added to the store on each page load, but it's not happening. However the #todoinput text box works fine. So it seems that the local store is being used, but everything isn't connecting to the back end.
I've run out of ideas to try and the docs on this are pretty thin, so I'm throwing this out there to see if anyone else has an ideas. Cheers.