https://github.com/devourtech/cms-server
The backend (server) which serves a REST API for clients to consume data for the course management system
https://github.com/devourtech/cms-server
hibernate java mysql springboot
Last synced: 5 months ago
JSON representation
The backend (server) which serves a REST API for clients to consume data for the course management system
- Host: GitHub
- URL: https://github.com/devourtech/cms-server
- Owner: DevourTech
- Created: 2021-01-15T11:27:03.000Z (about 5 years ago)
- Default Branch: develop
- Last Pushed: 2021-06-06T13:35:14.000Z (almost 5 years ago)
- Last Synced: 2025-01-16T05:23:19.292Z (about 1 year ago)
- Topics: hibernate, java, mysql, springboot
- Language: Java
- Homepage:
- Size: 143 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cms-server
The backend (server) which serves a REST API for clients to consume data for the course management system
## Environment Setup
### Github token to access packages
cms-server has dependencies
on many `spring` libraries *(maven dependencies)* as well as
a *shared* `core` library (developed as part of this project) which is used both by the
client module and the server module.
Since the shared `core` library is hosted as a Github Package,
you'll need to setup a Github token with your Github account for successful resolution of dependencies.
Navigate to `GitHub > Settings > Developer Settings > Personal access`
and click on `Generate New Token`
Give **at-least** `read:packages` permission.
Copy the token and setup the following environment variables:
```zsh
export GITHUB_USERNAME={Your Github Username}
export GITHUB_TOKEN={Copied token from the above step}
```
Make sure that the names of environment variables are as it is.
Otherwise, you might face a tough time :P
### MYSQL setup
To set up a mysql instance on your local, follow these steps:
* Download mysql server and follow the secure installation steps from [here](https://linuxhint.com/install_mysql_ubuntu_2004/)
* Create a user (using the above link) which will be used to authenticate and perform CRUD operations on the db
* Grant privileges to the user (refer above link).
* Create the db to perform CRUD operations.
* Create the following environment variables:
```shell
export CMS_MYSQL_HOST=localhost
export CMS_MYSQL_PORT=3306
export CMS_MYSQL_USERNAME=
export CMS_MYSQL_PASSWORD=
export CMS_MYSQL_DB=
```
### Code Style
This project uses [prettier-java](https://github.com/jhipster/prettier-java) to format JAVA code.
To install the formatter, run the following:
```shell
make install-formatter
```
To format the code, run:
```shell
make fmt
```
You can customize the formatting rules by editing the `.prettierrc.yaml` file present in the project root.
### Running the server
One command is adequate to launch the server to start serving HTTP requests.
```shell
make
```