Skip to main content

Configure

Configure generated backend

  • Configure host & port on which the backend will run.
    • Navigate to src/main/resources/application.properties
    • server.port=8082 (change this port number according to you)
  • Configure MongoDB host & port
    • Set environment variables to Application class Src/main/java/com/flightBooking/FlightBookingSystemApplication.java
    • DB_PASSWORD=root; DB_USERNAME=root; DB_SERVER=localhost:23017,
      • Add this line in environment_variables and change server to whatever server you want to connect.

Configure generated frontend

  • Configure host & port on which generated backend is running.
    • Navigate to:

src/config/apiConfig.js

  • Update the Following Parameters:
  • API_PROTOCOL
    • Set the protocol used by the backend service.

API_PROTOCOL = "http";

  • API_HOSTNAME
    • Set the hostname or IP where the backend is running.

API_HOSTNAME = "localhost";

  • API_PORT
    • Specify the port number your backend is listening on.

API_PORT = "8082";

  • API_VERSION
    • Define the version used by backend APIs.

API_VERSION = "v1";

  • Update the API_PORT value if your backend is hosted on a different port. (NOTE: Frontend API_PORT should be the port on which the Generated Backend is hosted)
  • Make sure the backend is running and accessible at the configured host and port.
  • Restart the frontend server to apply the changes.