I'm trying to develop a simple app and I'd like to read from a changing text file on the server with the meteor framework.
A little background: I tried using straight javascript to read the text file, but I got an error when doing this. My javascript was the following:
$.get("./temp.txt",function(returnedData)
{
$("#element").text(returnedData);
},"text/plain");
var text = $("#element").text();
In the web development tools in chromium it says the following when the script is run: "XMLHttpRequest cannot load file:///home/grneggandsam/WebDevelopment/Test/temp.txt. Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https, chrome-extension-resource."
Edit: I should say that in firefox it appears to be working fine... not sure why it doesn't work in chromium and chrome...
Sorry - I'm pretty new to pulling data off of servers. After doing some research on this error I started to think it might be because I am not using a server-side language. So, I decided to look into the Meteor Framework. I also just want to learn the meteor framework because of its usefulness.
My question is: Is there a way to read a text file with the Meteor framework, and how do you do it?