This project is a ReactJS application that displays a categorized list of restaurants based on their location states. The application fetches restaurant data from a provided API endpoint and presents it in a user-friendly format.
The server-side code resides in the proxy-server
folder. It utilizes ExpressJS to set up a middleware for CORS handling and defines a route to fetch restaurant data from the provided API endpoint.
The client-side code is located in the client
folder. It's a ReactJS application that utilizes React Router to navigate between different views/components. The main components include:
Home
: Displays the homepageRestaurantList
: Displays the list of restaurantsAbout
: About pageNotFound
: 404 error page
- Node.js
- npm or yarn
- Clone this repository.
- Navigate to the
proxy-server
folder and runnpm install
to install server dependencies. - Navigate to the
client
folder and runnpm install
to install client dependencies.
-
Start the server:
cd proxy-server npm start
The server will run on port 5000.
-
Start the client:
cd client npm start
The React app will run on port 3000.
The Express server fetches restaurant data from the provided API endpoint: https://nextjs-orpin-omega-98.vercel.app/api/restaurants
The application is deployed on Vercel and accessible via a public URL provided by Vercel.
API testing can be performed using tools like Postman or curl
before integrating it into the application.
The project is available on GitHub at repository link. The repository is public and accessible to view the codebase.
The homepage of the application lists restaurants under categorized subtitles based on their locations, following a format similar to:
New York:
- Restaurant 1
- Restaurant 2
- Restaurant 3
Texas:
- Restaurant 4
- Restaurant 5
- Restaurant 6
- The application is designed to be responsive and user-friendly.
- Emphasis has been placed on maintaining clean and maintainable code practices.
Feel free to tailor the content to better fit your project's specifics and add more details or sections as needed. Adjust the placeholders like the repository link with the actual URLs and information specific to your deployment.