Chat Log
I have created the REST Service using the following
node js and MySQL.
The database name that I have named is 'chat_log'. I have used HATEOAS principle to design the API. I have used Get to retrieve the chat conversation.
Steps to follow:
- Create a new node project using the command
- Install the dependencies
npm install express mysql
- Run the app.js file
node app.js
The server runs at localhost on port 3000. You can curl it and see the results at http://localhost:3000/messages
npm init
Make sure to use your password in app.js file or use this command in your SQL query.
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';