- Preview
- Step By Step Tutorial
- Features
- Prerequisites
- Project Structure
- Installation
- Run App
- Usage
- Project Goals
- Contact
This project demonstrates how to create a full-stack application using Vite.js, React, and Node.js to generate link previews through web scraping. The backend utilizes Express.js, Axios, and Cheerio to fetch and parse HTML from URLs, while the frontend is built with React and TypeScript.
Click on Thumbnail to Watch on Youtube
- Vite.js + React: Fast and modern frontend setup with TypeScript support.
- Node.js + Express: Robust backend server for handling API requests.
- Cheerio: Lightweight and fast web scraping with HTML parsing.
- Axios: Fetch content from web pages efficiently.
- Link Preview: Generate dynamic previews including title, description, and images from any URL.
Ensure you have the following installed:
link-previewer
├── .. vitejs code for reactjs # Frontend: Vite.js + React
├── server # Backend: Node.js + Express
└── README.md # Project Documentation
-
Clone the repository:
git clone https://github.com/gkhan205/link-previewer.git cd link-previewer
-
Install dependencies for both frontend and backend:
-
Frontend (Vite.js + React):
npm install
-
Backend (Node.js + Express):
cd server npm install
-
-
Start the Node.js backend server:
cd server npm start
-
Start the Vite.js React frontend:
cd .. npm run dev
-
Open your browser and navigate to:
http://localhost:5173
- Enter any URL into the input field, and the application will fetch the link preview, displaying the title, description, and an image if available.
This project is designed to:
- Demonstrate how to set up a full-stack application using modern tools.
- Show the process of web scraping with Node.js and Cheerio.
- Provide an example of integrating a backend API with a React frontend.
If you have any questions or want to reach out, connect with me on LinkedIn or Twitter.
Happy coding! 🚀