Closed tbranyen closed 9 years ago
Thanks, @tbranyen ! The caching behavior is intentional--I expect the file to be served many times more often than it is built, and I don't particularly mind having to re-start the server in order to deploy JavaScript changes. If we want constant update, we'll have to also update the Ansible deployment logic to explicitly provide for that.
But all this is probably all for naught--see gh-33
Don't worry about the failure, by the way. I've seen this happen a few times now:
1) "before all" hook
0 passing (5s)
1 failing
1) "before all" hook:
Error: Could not detect server at port 4444 after 5 attempts.
So I think it's time to bump that timeout for TravisCI's sake
Ah, okay I see now, this is purely for production (hence the app-production filename). I just issued npm run start-dev
and it works as I'd expect. Rock on!
Currently the app bundle source is cached for the lifetime of the server. It's loaded in synchronously and if errored, will throw an exception at the initialization-time of the server.
This update does the following:
error
event is listened to and the same exception is triggered at runtime instead of load-time (is this a benefit or negative?).__dirname
so that if you decide to run the server from a different folder, it will always know where to find the actual bundle.