The backend is built with Express and handles the greeting API.
-
Navigate to the
backend
directory:cd backend
-
Install dependencies:
npm install
-
Start the server:
npm start
The server will run on http://localhost:5000
.
GET /api/greet?name={name}
: Returns a greeting message for the provided name.
The frontend is built with React and Vite.
-
Navigate to the
frontend
directory:cd frontend
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
The app will run on http://localhost:3000
.
To Run the code, run:
npm run dev
To build the project for production, run:
npm run build
- Start both the backend and frontend servers.
- Open http://localhost:5173 in your browser.
- Enter your name in the field and click "Get Greeting" to receive a personalized greeting message.
https://greeting-frontend-nd4zmcheq-ritik178s-projects.vercel.app