added mongo logic to node server