Chatop API

Installation

Step 1 - Prerequistes


Make sure the following softs are installed

When installing MySQL, you will be asked for default credentials, choose them and add them to your environment variables as following :
  • spring.datasource.username: (username)
  • spring.datasource.password: (password)

Step 2 - Database creation


  • Start MySQL
  • Start your MySQL GUI tool and connect to your MySQL
  • Create the BDD by importing the SQL script located in ./resources/script.sql

Step 3 - Security


Set a JWT secret in your environment variables as following :
  • jwt.secret: (asecret)

Step 4 - File hosting


  • In your terminal run `npm install -g http-server`
  • Go to the root of the project with the terminal
  • Then run `http-server ./`

Step 5 - Start the API

Once everything running fine you can start the Spring boot app.
Go to the root of the project and run `mvn spring-boot:run`

Documentation

While the API is running you can access its swagger documentation at : http://localhost:3001/api/swagger-ui/