Chatop API
Installation
Step 1 - Prerequistes
Make sure the following softs are installed
- Java JDK 17 : download here
- Maven: download here
- MySQL >= 8 : download here
- A MySQL GUI Tool (optionnal) : download here
- Node >= 16 and npm 8 : download here
- 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 ./`
Once everything running fine you can start the Spring boot app. Step 5 - Start the API
Go to the root of the project and run `mvn spring-boot:run`