This is a simple web application that uses a Node.js backend to serve user data and a React frontend with TypeScript to display the data dynamically.
- Fetch user data from the server.
- Display data in a dynamic table.
- Handle errors gracefully.
- Built with React (TypeScript) and Node.js.
git clone https://github.com/your-username/react-node-app.git
cd react-node-app
- Navigate to the
backend
directory:cd backend
- Install dependencies:
npm install
- Start the server:
node server.js
- The server will run at
http://localhost:5000
.
- Navigate to the
frontend
directory:cd ../frontend
- Install dependencies:
npm install
- Start the development server:
npm run dev
- The app will be accessible at
http://localhost:5173
.
- Start both the backend and frontend servers.
- Open your browser and navigate to
http://localhost:5173
. - Click the Fetch Data button to retrieve and display user data.
react-node-app/
├── backend/ # Node.js server files
│ ├── server.js # API endpoint
│ └── package.json # Backend dependencies
└── frontend/ # React TypeScript app files
├── src/ # React source code
├── public/ # Static files
└── package.json # Frontend dependencies
- React (TypeScript)
- Node.js
- Axios
- Express
For questions or feedback, feel free to reach out via email at 97josephkibira@gmail.com
.