Skip to content

Important-Project-Forks/ecommerce-backend

 
 

Repository files navigation

ecommerce

Ecommerce backend apis

  • This is a Maven Project. Ensure, Maven is installed on your system.
  • It is Recommended that you use Linux Based OS.
  • It might happen that you have installed XAMPP/LAMPP software (by Bitnami) on your system. Instead of using the db provided by XAMPP/LAMPP by bitnami, it is recommended that you install mariadb-server and use it as database while running this application.

###How to run in local

  1. Change the Application Properties (E.g. username/password of DB) present in resources/application.properties according to your local mysql-server.
  2. Create a database called ecommerce with CHARACTER SET utf8mb4 and COLLATE utf8mb4_0900_ai_ci. MariaDB does not support COLLATE utf8mb4_0900_ai_ci. So, if you are using MariaDB, open database-dump.sql file and replace COLLATE utf8mb4_0900_ai_ci with COLLATE utf8mb4_general_ci
  3. Import database-dump.sql in it.
  4. To run the application, run the command sh run.sh i.e. execute the run.sh file.
  5. After starting application, go to http://localhost:8080/api/swagger-ui.html/

Category/Update/{id}

  • The input for updating the category via API is
{
    "categoryName":"name",
    "imageUrl":"url",
    "description":"desc"
}

In case of "java.lang.IllegalStateException: Unable to load cache item error":

  • Go into pom.xml and comment out the scope for the "spring-boot-starter-tomcat" dependency

How to use prod profile

mvn package java -jar -Dspring.profiles.active=prod

Run in production server with latest changes in master

#admin access email: admin@gmail.com password: admin firstname: admin

##export database mysqldump -u root -p ecommerce > database-dump.sql scp root@104.236.26.66:database-dump.sql .

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 96.6%
  • Shell 2.5%
  • Dockerfile 0.9%