I have a static page set up to point to my images directory that is being pulled by a website on a separate server. For some reason, when I go directly to the image URL the image loads up (Chrome) and if I refresh the page it gives me an error like this:
Cannot GET /users/picture
My app.js has this:
var app = express();
app.disable('view cache');
app.use(express.static(__dirname + '/public')); //setup static public directory
app.use('/users/picture', express.static('./public/images/users'));
...
Plus some routes and other things like multer() for picture uploads.
For some reason if I refresh the page on the production server on Bluemix, the picture loads every third time. Otherwise it gives me this Cannot GET route error.
Could it be related to the memory?
This can happen if you accidentally bind multiple applications to the same route. The router/load balancer is picking the other application on some requests. Confirm all your applications are bound to the correct unique routes in the bluemix dashboard or by doing cf apps