To practice connecting a front end angular application to a node backend.
The connections have been , we now just have to put in the logic inside the functions to pass the information along.
-
We need to server the public folder from our server file.
-
We want to use sessions to store the screenname, so we are going to to Initialize express-session
-
Write the function to save the screenname to the session in the /api/screenname endpoint
-
Write the function that will accept a request and get the chats
-
Write the function that will accept a request and post a new chat
-
Write the function that will accept a request and delete all the chats
-
Make a GET $http call to the
"/api/chats"
endpoint. -
Make a POST $http call to the
"/api/chats"
endpoint. -
Make a DELETE $http call to the
"/api/chats"
endpoint.
-
Call the mainSrvc's getChats method to get the chat messages
-
Call the mainSrvc's addChats method to add a new chat message
-
Call the mainSrvc's deleteChats method to delete the chat messages