This project was generated with JAVA version 11.
17th February 2020
Michael Ochieng' Odera
In case of any bugs or improvements, contact me through email:michogelira@gmail.com or phone:+254733258286
developed to heroku
There were no major bugs to be encountered and the console would prove to be most helpful in case of any need to log out the errors
- Java11
- Gradle
- Spark Framework
- Maven
- Postgres
- SQL2O
- json
- gson
It is imperative that you install a JavaRuntimeEnvironment IDEA and Gradle dependencies else the system won't function as required.Knowledge of working with Java is also important.
The project allows one to enter data through various end points belonging to users, departments and event news, using json formats and implementing gson to convert the json objects to POJOs, and the POJOs fetched back to json objects with a get or post to view or send certain information to the database.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
The following are the api routes for the above application: -
| Method | model | End Points |
|------- |----------- |---------------------- |
|post | user | /users/new |
|post | department |/departments/new |
|post | news | /news/new |
|get | user | /user/:id |
|get | user | /users |
|delete | user | /users/:id |
|get | department | /departments |
|get | department | /department/:id |
|delete | department |/department/:id |
|get | user |/departments/:id/users |
|get | news | /news/:id |
|put | news | /news/:id |
|delete | news | /news/:id |
|delete | news | /news/delete/all |
|get | news | /news |
|get | news |/departments/:id/news |
{
"userName" : "user254",
"userCompanyPosition": "Secretary",
"userCompanyRole":"Taking Notes",
"departmentId": 3,
"id":5
}
{
"departmentName": "Managerial",
"departmentDescription":"Management and company activity oversite",
"employeesNumber": 15,
"departmentId": 2
}
{
"newsTitle": "Sanitation",
"newsContent":"Cleaning will be done on Mondays as from 7:30pm - 9:30pm",
"departmentId": 3,
"id":2
}
Run gradle run
for a dev server. Navigate to http://localhost:4567/
. The app will not automatically change if you make any changes white the app is still live. A rerun of the command will be needed in this case.
Run netstat -pliten |grep java
to check for ports that are being used by java processes. You can also use gradle run|build
.
Run gradle build
to build the project. The build.gradle
file is important for any of the required process dependencies to function properly.
Run run test
to execute the unit tests on your local directory after git cloning or downloading.
To get more help on the Spark 11 use go check out the APACHE SPARK SITE.
MIT LICENSE