In clientappservicesmessage.service.ts, we are going to update addMessage() as follows:
// SNIPP SNIPP
addMessage(message: Message): Observable < Message > {
return this.http.post < Message > ('/api/post-message', message);
}
// SNIPP SNIPP
We have updated the end point to which we have posted the message.