Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iinnffiinniittyy/vert.x_project
REST API using Vert.X library. (Layered Architecture)
https://github.com/iinnffiinniittyy/vert.x_project
dao-design-pattern get java post postman-test put rest-api vertx vertx-web
Last synced: 13 days ago
JSON representation
REST API using Vert.X library. (Layered Architecture)
- Host: GitHub
- URL: https://github.com/iinnffiinniittyy/vert.x_project
- Owner: IInnffiinniittyy
- Created: 2023-05-07T10:44:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-11T11:05:20.000Z (over 1 year ago)
- Last Synced: 2024-10-10T20:42:06.711Z (about 1 month ago)
- Topics: dao-design-pattern, get, java, post, postman-test, put, rest-api, vertx, vertx-web
- Language: Java
- Homepage: https://vertx.io/docs/
- Size: 45.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vert.X_Project
## Problem Statement.
- To build a GET, PUT and POST API using the VertX framework.
- Focus areas : “Core”, “Web” & “Database Client” sections.
- To create a “user_info” table in the database with the following columns – “id - UUID”, “name – varchar(64)”, “email – varchar(64)”, “gender – enum (male, female)”, “status – enum (active, inactive)”, “timestamp – datetime with timezone”.
- The id column is the primary key – a new UUID should be generated when the user is created & timestamp should be updated whenever the user record is created or updated with the current system time.
- Following 3 API need to the exposed and tested using postman :
- GET API:
--> Fetches all the records from the user_info table and returns the response in a JSON array.
--> The end point would be “/api/users” with the GET method.
--> Should return HTTP status 200 for success.
- POST API:
--> Create a new user – POST to “/api/users”.
--> The user JSON object will be sent in the body with fields “name”, “email”, “gender” & “status”.
--> The response will be a JSON object that contains the “{ id: }”.
- PUT API:
--> To update a specific user record – PUT to “/api/users/”.
--> The user JSON object will be sent in the body with fields “id”, “name”, “email”, “gender” & “status”.
--> The response will be a JSON object that contains the “{ id: }”.
## Technology and Tools Used :
- Core Java
- Vert.X library
- MySQL database
- JDBC-DAO pattern
- Git bash
- Eclipse IDE
- Postman
- Google Chrome
- Notepad
## How to run the program.
- Simply clone this repository on your local system.
- Open with an IDE that has good support/environment for Java.
- Force update the project so that all the dependencies of build tools would get resolved for smooth running of the application.
- Go to the utility package and change the database information as per your system. (You can test, whether connection with the database established or not in your system by running the utility.Testing_Connection.java class)
-->Note: you need to create the table in the database as per the given problem statement before proceeding further. Thanks!
- Now go to the MainVerticle.java class and Run as java application. (You will get the message "server started" in the console)
- Now use Postman to expose/test the given APIs with API root end point :
```
http://localhost:8080/api/users
```Thank you!
## Author- [Tanuj Pant](https://github.com/IInnffiinniittyy)
## Contact Me
- [LinkedIn](https://www.linkedin.com/in/tanujpant6263/)
- Email : [email protected]