IP Logger is a simple web application built with Next.js and Firebase that logs IP addresses of visitors. This project serves as a basic demonstration of how to use Next.js and Firebase together to create a functioning web application.
Before you begin, ensure you have the following installed:
- Node.js (version 20.11.* or higher)
-
Clone the repository:
git clone https://github.com/newQuery/firebase-nextjs-ip-logger.git
-
Navigate to the project directory:
cd firebase-nextjs-ip-logger
-
Create a Firebase project:
- Go to the Firebase Console.
- Click on "Add project" and follow the prompts to create a new project.
- Once your project is created, navigate to Project settings > General and locate your Firebase config object.
-
Copy environment variables:
- Duplicate the
.env.example
file and rename it to.env
. - Update the
.env
file with your Firebase project's configuration values.
- Duplicate the
-
Update Firebase configuration:
- Open
config/firebase.ts
file. - Replace the dummy values with the actual values from your Firebase project's configuration.
- Open
-
Install dependencies:
npm install
To start the development server, run:
npm run dev
Visit http://localhost:3000 in your browser to view the application.
For deployment, you can use platforms like Vercel, Netlify, or Firebase Hosting. Follow their respective documentation for deployment instructions.
Contributions are welcome! Feel free to submit pull requests or open issues if you encounter any problems or have suggestions for improvements.
This project is licensed under the MIT License - see the LICENSE file for details.
Happy logging! 📝🌐