Don't watch public directory for changes. See #894 #895

Closed
wants to merge 1 commit into
from

Projects

None yet

4 participants

@mitar
Collaborator
mitar commented Mar 31, 2013

I made a simple change to not watch public directory for changes. I do not see a reason why it should be watched, but it prevents server restarting when new files are added to public directory. See #894 for more details.

@bbbmmmlll

@mitar Doesn't changing ignore_files have the side effect of breaking the bundler and deploy commands? This will exclude files in public from being bundled or deployed.

@mitar
Collaborator
mitar commented Mar 31, 2013

From comments and the code I saw (but have not done thorough check) this only influences what is watched, no?

@paralin
paralin commented Apr 10, 2013

You would want it to refresh when the public changes because of images :)

@mitar
Collaborator
mitar commented Apr 10, 2013

You mean, I would maybe want to reload the page because of the images? So that it is not necessary to reload the page manually in the browser?

@jagill
Contributor
jagill commented Apr 10, 2013

I definitely like that it reloads on changes to public files. Not only is it a development convenience, but I also like knowing that in production, when I make a change, it's hot-reloaded to connected clients.

@paralin
paralin commented Apr 10, 2013

Okay here's what this SHOULD do and this pull does NOT address this:

We need a system to define special folders in Meteor.

  1. System to define a static folder (no hotloading no compiling bundled as static but unpublished folder)
  2. System to define non-reloading public subdirectories

Oftentimes I want to use this to have a secure downloads folder. Right now, I have something I would author into a package if it wasn't so damn hacky, but on startup (assuming it's bundled to heroku's ephemeral filesystem) it moves the secure files folder out of public (because .zip etc are deleted from bundle if not in public) so it is not served. Then, files are copied temporarily to temporary folders (random string subdir) in public for temporary downloads. Works quite well! Though I could make a package to do this, though, it doesn't seem like a very good solution and I'm sure they will come up with something better for it.

@mitar
Collaborator
mitar commented Apr 12, 2013

OK. I now see that was a bad idea to store things into public, because it tries to bundle it. So for now I moved things under .meteor and I do:

__meteor_bootstrap__.app.use('/pdf', connect.static(Storage._storageDirectory, {maxAge: 24 * 60 * 60 * 1000, redirect: false}))
@mitar
Collaborator
mitar commented Apr 12, 2013

I didn't really get the symlink trick to work. If I made symlink from /public/pdf/ to /.meteor/pdf/, it still tried to bundle everything.

@mitar
Collaborator
mitar commented Apr 12, 2013

I am closing this.

@mitar mitar closed this Apr 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment