extracted js code into external file, added path in Express.