Should I see an index.html file created?

18 views
Skip to first unread message

Adam Monago

unread,
Nov 25, 2015, 11:12:05 AM11/25/15
to river4
Hi Folks,

Earlier this week, I set up River4 on my Mac locally without a hitch.  I just double checked though and noticed that it does not generate an index.html file locally. I was assuming this is just a default node.js behavior.

I'm troubleshooting my deployment to Heroku/S3.  The app seems to be running on Heroku fine (monago-river.herokuapp.com)  but is not accessible through my custom domain (news.adammonago.com).  I'm assuming this is because the S3 bucket is configured to serve the static site with the index.html file which does not ever appear to be created.  I can manually upload a file to S3 with that name, but not sure how to have it pull in my river.  That also seems to be sidestepping a problem with my config.

I'm a bit confused about whether I should be seeing an index.html file created on S3 or not.  If so, any tips as to why it's not created?

Also, can anyone point me at the code to style the default river4 header/toolbar that are visible at the Heroku url?

Many thanks,
Adam 

Andy Sylvester

unread,
Nov 26, 2015, 10:50:02 PM11/26/15
to riv...@googlegroups.com

Adam,

Thanks for posting about this issue. I did a test of the latest version of River4 (0.122) running with the local filesystem on Windows, and I also noticed that there was no index.html file in the river4data folder. I do not think this is a Node.js issue.

I did some review of river4.js, and saw that there is a function that should be copying index.html to your S3 storage space (copyIndexFile). However, this function is not called within river4.js or lib/utils.js. I then looked at some prior versions of River4, and saw that this function used to be called from the everyFiveMinutes function and the loadServerData function.

I added the call to copyIndexFile back into the current version of River4, and this appears to solve the problem of generating the index.html file. You can see the results at http://andysylvester.com/files/riverupdate/. I have copied the updated version of river4.js to this same folder (http://andysylvester.com/files/riverupdate/river4.js), you could try updating your Heroku install with this file. I will file a Github issue on this tomorrow.

I did look at your current files at http://news.adammonago.com/, and saw that there were some errors present. I took a stab at some updates, look at http://andysylvester.com/files/monago/ and see what you think. The link you had for styles.css was not valid, I switched it to the one at mlbriver.com. Also, your calls to httpGetRiver had incorrect paths for getting to the river files, you should be able to use the index.html file at the above address in your site directory without changes. I also added some Javascript at the end of the index.html file to load the river file for your default tab when the page is first loaded.

Finally, it appears from your Heroku app page that you could change the contents of the appConsts variable to change the text in the header. There is some CSS style data within a style tag within the page, I would look at that if you want to change styling within the header and footer.

Let me know if you have further questions. Happy Thanksgiving!

Andy Sylvester




--
GitHub repository: https://github.com/scripting/river4
How to ask for help: http://scripting.com/2014/03/19/howToAskForHelpWithSoftware.html
---
You received this message because you are subscribed to the Google Groups "river4" group.
To unsubscribe from this group and stop receiving emails from it, send an email to river4+un...@googlegroups.com.
To post to this group, send email to riv...@googlegroups.com.
Visit this group at http://groups.google.com/group/river4.
To view this discussion on the web visit https://groups.google.com/d/msgid/river4/3cce05f6-11e6-423c-9e05-991e61b6ea7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Adam Monago

unread,
Dec 4, 2015, 6:13:15 PM12/4/15
to riv...@googlegroups.com
Hi Andy,

I wanted to thank you for investigating this for me.  I didn't have enough history to know what to expect.  You've straightened me out with your interim suggestions for my index file and you've also given me some great thoughts around how to progress forward.  I'll reach out to you directly to continue the chat.

Cheers,
Adam

You received this message because you are subscribed to a topic in the Google Groups "river4" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/river4/k_OkZKZdx0I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to river4+un...@googlegroups.com.

To post to this group, send email to riv...@googlegroups.com.
Visit this group at http://groups.google.com/group/river4.

For more options, visit https://groups.google.com/d/optout.

Anton Zuiker

unread,
Dec 4, 2015, 9:18:00 PM12/4/15
to river4
Adam,

I had similar confusion about the index file. See my notes in the Narrating section of this outline, after the 'course correction' line:


Anton
Reply all
Reply to author
Forward
0 new messages