This project integrates MongoDB with a Next.js application.
This repository connect a Next.js application with MongoDB to shorten links. It includes examples for CRUD operations, routing, and API endpoints.
- Clone the repository:
git clone https://github.com/your_username/link.git
cd link
- Install dependencies:
npm install
- Environment Variables:
Create a
.env.local
file in the root directory and add your MongoDB connection string:
MONGODB_URI=your_mongodb_connection_string
Start the development server:
npm run dev
Open http://localhost:3000 to view the application.
- MongoDB integration using official driver
- Next.js API routes for CRUD operations
- Server-side rendering & static site generation
- Easy environment configuration
Feel free to submit issues or pull requests for improvements. Please follow the repository's code of conduct.