Add node API to call mongodb and change controller accordingly