Example code for MEAN app taken from Amos Haviv's book "MEAN Web Development"