Skip to content

Latest commit

 

History

History
65 lines (49 loc) · 2.29 KB

README.md

File metadata and controls

65 lines (49 loc) · 2.29 KB

Build a Fynd Extension using Java + ReactJS

Coverage Status

Built With

React Spring Redis Java

Prerequisites

Before you start, make sure you have the following tools and accounts:

  1. FDK CLI: A command-line interface for Fynd extensions.
  2. Java 14 or higher: Required to run and build the Java backend.
  3. Maven: A build tool for managing project dependencies and building the Java application.
  4. Redis: An in-memory data structure store used as a database, cache, and message broker.

Getting Started

  • Initialize the template
$ fdk extension init --template java-react
  • Start a preview in platform to open a tunnel to FCP (Fynd Commerce Platform)
$ fdk extension preview
  • Build front-end files
# Using yarn
$ cd frontend && yarn run build
# Using npm
$ cd frontend && npm run build
  • Run the application
$ mvn clean install
$ mvn spring-boot:run  

You can visit the URL from preview command or http://localhost:8080/ to check your extension.

Docker Instructions

To run the application using Docker, follow these steps:

# Build the Docker image
$ docker build -t my-java-react-app .
# Run the Docker container
$ docker run -p 8080:8080 my-java-react-app 

Tests

Use the Below Controller to Test the Application :

  • HealthController : Uses the Actuator Health points to check if all the resources are stable and active

      http://localhost:8080/_healthz