Code example from: Write Modern Web Apps with the MEAN Stack