Skip to content

a-hosseini/Automobile-Maintenance-Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automobile Maintenance Tracker

Pre-install

  1. install jdk8

    • set JAVA_HOME environment variable
  2. install MAVEN

  3. install MongoDB

  4. install Angular

    • npm install -g @angular/cli@1.7.4

Install

$ git clone https://github.com/a-hosseini/Automobile-Maintenance-Tracker.git

Run Test Cases

$ mvn test

Build & Run

  1. Tomcat is the embedded web server in this application.
  2. Open the project in an IDE like NetBeans.
  3. Update src/main/resources/application.yml to connect to your MongoDB
    • The application create mydb schema in your MongoDB.
    	spring:
    		data:
    			mongodb:
    				database: mydb
    				host: 172.17.117.175
    				port: 27017	
    	
    
  4. Build and run the project from the IDE.
  5. Use Postman to Get, Post, Put and Delete entities.
  6. This is a full stack application and the software works end to end.
  7. The UI is build using Angular 5.
	\> cd \<PROJECT_ROOT_FOLDER>\client 
	\> ng serve

Now, UI application is http://localhost:4200 and the server is http://localhost:8080.

Insert: How to Post a new entity into the ReST endpoint:

{
    "vin": "ABC",
    "make": "Honda",
    "model": "Accord",
    "year": 2010,
    "mileage": 100000,
    "color": "Red",
    "trim": "Ex-V6",
	type: "Electric"
}

Post

Find: How to Get an entity from the ReST endpoint:

Get

Update: How to Put a new entity into the ReST endpoint:

- http://localhost:8080/car
{
    "vin": "ABC",
    "make": "Honda",
    "model": "Accord",
    "year": 2010,
    "mileage": 100000,
    "color": "Blue",
    "trim": "Ex-V4",
	type: "Diesel"
}

Put

Delete: How to Delete a new entity into the ReST endpoint:

- http://localhost:8080/car
{
    "vin": "ABC",
    "make": "Honda",
    "model": "Accord",
    "year": 2010,
    "mileage": 100000,
    "color": "Blue",
    "trim": "Ex-V4",
	type: "Diesel"
}

Delete