using common js code in nodejs api