Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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)

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]