HostBooks_fullstack_app

Prerequisites

  • Basic familiarity with HTML & CSS
  • Basic knowledge of JavaScript and programming
  • Spring Boot Basics
  • Angular basics
  • Node.js and npm installed globally

Tools and technologies used Server-side technologies

  • Spring Boot
  • JDK - 1.8 or later
  • Spring Framework
  • Spring Data JPA (Hibernate)

Front end technologies

  • Angular (Latest version as of now)
  • Bootstrap 4
  • Node and NPM
  • JQuery

Tools

  • Maven - 3.2+
  • IDE - Eclipse or Spring Tool Suite (STS) // Spring boot API development
  • Visual Studio 2017 // Angular App development
  • Angular CLI

Testing REST APIs

Use below Rest endpoints to test CRUD Rest APIs and in Angular application.

Get All Employees:

HTTP Method: GET

  http://localhost:8080/api/v1/employees

Get Employee By Id: HTTP Method GET

  http://localhost:8080/api/v1/employees/{employeeId}

Create Employee: HTTP Method - POST

  http://localhost:8080/api/v1/employees

Update Employee HTTP Method - POST

    http://localhost:8080/api/v1/employees/{employeeId}

Delete Employee By Id: HTTP Method - DELETE

  http://localhost:8080/api/v1/employees/{employeeId}

Or you can go to Swagger UI for test.

  http://localhost:8080/swagger-ui/index.html

How to run the application

  • First download or clone this respository in your local system.
  • After that open frontend directory from root directory in vsCode or similar code editor.
  • Open backend direcotry in STS or similar IDE.
  • First install necessary node modules in your frontend project by excuting following command in terminal
  •         npm i
    

    Or

            npm install
    
  • Run the src/main/java/com/HostBooks/HostBookFullStackApplication.java file as Spring Application from backend directory.
  • Now run the frontend angular project using following command in terminal.
  •         ng serve
    
  • Backend part will be listening to port localhost:8080 And Frontend will listening localhost:4200
  • Base url
  •        http://localhost:4200/employees
    

*You can refer to this video if you having some issu. link