This repository contains two modules
-
Backend Contains the following APIs,
- Multiverse Programme
- Fellowship Programme
- Academix Project
-
Frontend Contains the admin dashboard
- Tomcat 9
- MySQL 8
- Maven
-
Create an empty MySQL database
-
Create a copy of application.properties.example file on the backend module and add your credentials.
cp backend/src/main/resources/application.properties.example backend/src/main/resources/application.properties nano backend/src/main/resources/application.properties
Replace ${DB_NAME} ${DB_USERNAME} and ${DB_PASSWORD}.
ex :
replace
spring.datasource.username = ${DB_USERNAME}
withspring.datasource.username = root
-
Build the project using maven
mvn install
Optional : You can build the modules separately
-
Copy the generated
.war
file to the tomcat's webapp directory.cp backend/target/core.war /path/to/tomcat/webapps cp frontend/target/dashboard.war /path/to/tomcat/webapps
-
You can access the UI with http://localhost:8080/dashboard
-
Default credentials are,
- username : admin
- password : admin
- [Build the project](#Building the project) and deploy it to the tomcat.
- Navigate to the frondend app's dist directory
cd frontend/app/dist
- Remove the contents of the dist directory and create the symlinks as follows
rm -rf * ln -s /path/to/tomcat/webapps/dashboard/index.html ln -s /path/to/tomcat/webapps/dashboard/main.js ln -s /path/to/tomcat/webapps/dashboard/main.js.map ln -s /path/to/tomcat/webapps/dashboard/main.css ln -s /path/to/tomcat/webapps/dashboard/main.css.map
This will rebuild the app and update the deployed application on the tomcat because it has been linked with symlinks.
cd frontend/app
npm run build
(You should create the symlinks first)
Run the watch command,
cd frontend/app
npm run watch
This will watch files and recompile whenever they change.
(You should create the symlinks first)