To get the web service up and running, please follow the instructions bellow.
- Download and install MySql. Run MySql instance at localhost.
- For more information about MySql, please visit https://dev.mysql.com/
- Create database 'AdaSupport' with the follow statement:
CREATE DATABASE AdaSupport;
- Create table 'messages' with the follow statement:
CREATE TABLE messages (
id int NOT NULL AUTO_INCREMENT,
conversation_id varchar(255) NOT NULL,
sender varchar(255) NOT NULL,
message varchar(255) NOT NULL,
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT PK_messages PRIMARY KEY (id, conversation_id)
);
- Download and install node.js.
- For more information about node.js, please visit https://nodejs.org/en/
- Run the following command to install dependencies:
npm install
- Run the following command to start the web service:
npm start
- Run the following command to run tests:
npm test
Note: The test collection can also be run through the postman application. https://www.getpostman.com/