Seems to me like you are using Express or a similar node HTTP server?
Yes, sorry i should have mentioned this actually.
Wow, Yes thats it. Im using _dirname to server the public folder! Thats it! Im not so knowledgable about the back end. Thanks for clearing that up for me. This was alot of help.