This project contains a simple Todo app built with React, which serves as a common frontend for two separate backend implementations: one using Spring Boot and the other using Express.js.
Users can interact with either backend, while the frontend remains the same, providing flexibility and showcasing different backend technologies.
-
React Frontend: Single-page application for managing todos.
-
Spring Boot Backend: Java-based backend with REST API.
-
Express.js Backend: Node.js-based backend with REST API.
-
Node.js and npm (for React and Express.js).
-
Java and Maven (for Spring Boot).
- Navigate to the
Frontend
directory:
cd todo-frontend-react
- Install dependencies:
npm install
- Start the React development server:
npm run dev
- Navigate to the
Spring Boot Backend
directory:
cd todo-backend-java
- Build and run the Spring Boot application:
mvn spring-boot:run
- Navigate to the
Express Backend
directory:
cd todo-backend-node
- Install dependencies:
npm install
- Start the Express server:
node index.js
To switch between using the Spring Boot or Express.js backend, update the API base URL in the React frontend configuration.