Live Demo: https://bitweather-rz0n.onrender.com
A Node.js-based web application that displays real-time weather information using a third-party weather API. It also includes features like user authentication and database integration.
- Real-time weather updates by location
- User registration & authentication (JWT-based)
- Session management
- MongoDB integration
- Responsive UI for various screen sizes
- Backend: Node.js, Express
- Database: MongoDB
- Authentication: JWT, Express Session
- API: OpenWeatherMap or any weather API
Create a .env file in the root directory and configure the following environment variables:
API_KEY=your_weather_api_key_here
MONGO_URI=mongodb://localhost:27017/weatherDB
JWT_SECRET=your_secure_jwt_secret_key
EMAIL_USER=your_email@example.com
EMAIL_PASS=your_email_password
SESSION_SECRET=your_secure_session_secret-
Clone the repository
git clone https://github.com/SabarishCodeWizard/whetherApp-nodeJS.git
-
Navigate to the project directory
cd whetherApp-nodeJS -
Install dependencies
npm install
-
Run the application
npm start
-
View in browser
Openhttp://localhost:3000in your web browser.
weather-app/
β
βββ models/ # Mongoose models
βββ routes/ # Routes details
βββ public/ # Static assets (CSS, JS, images)
βββ .env # Environment variables
βββ server.js # Main application entry point
βββ package.json # Project metadata and dependencies
npm start: Starts the server using Nodenpm run dev: Starts the server with nodemon (if configured)
Contributions are welcome!
To contribute:
- Fork the repository
- Create a new branch (
git checkout -b feature-name) - Commit your changes (
git commit -m 'Add feature') - Push to the branch (
git push origin feature-name) - Open a Pull Request
Developed by Sabarish
GitHub: @SabarishCodeWizard