Please draw a simple drawing to show your system.
It would be better if you can upload(attach) your ejs source file so that I can understand what might be your problem and provide necessary help.