Nodejs serves up OLD app.js


#1

I am running passenger and nodejs on a fully hosted subdomain at DH. When I update the app.js file in my user/application directory, the DH nodejs server continues to serve up the previous version of app.js. I have confirmed through FileZilla and PuTTY that the new app.js file is in place right where it should be.

I have twice submitted support tickets on this issue, only to have the correct app.js start being served up while I awaited a response.

I know that nodejs has a cache. Is it possible that the DH nodejs cache is not immediately being cleaned up when I submit changes to my app.js? Do I need to do something programmatically to ensure the correct version of app.js gets served up?


#2

if I remember correctly, Node.js needs to be restarted after making changes to apps. Does Passenger allow you to restart the app after updating it?


#3

It does! From the root of your application (in the terminal):

mkdir tmp
touch tmp/restart.txt

From now on every time you touch/update restart.txt, passenger will know to reload the app.


#4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.