A simple, responsive News Application built with HTML, CSS, JavaScript and powered by the NewsAPI. This project is deployed on Netlify with serverless functions for secure API key handling.
- 🔎 Search news by keyword
- 🌍 Filter news by categories (India, Technology, Sports, etc.)
- 📱 Responsive design (mobile-friendly with hamburger menu)
- 🖼️ Displays news cards with image, title, description, and source
- 🔗 Clickable cards that open full articles in a new tab
- 🔒 API key hidden safely in Netlify environment variables
- Frontend: HTML, CSS, JavaScript (Vanilla)
- Backend (serverless): Netlify Functions (Node.js)
- API: NewsAPI.org
- Deployment: Netlify
├── index.html # Main page
├── style.css # Styling
├── script.js # Frontend logic
├── netlify/
│ └── functions/
│ └── news.js # Netlify serverless function
└── README.md # Project documentation
-
Clone the repo
git clone https://github.com/your-username/news-app.git cd news-app
-
Install dependencies (for Netlify functions)
npm install
-
Set up environment variable in Netlify
-
Go to Netlify Dashboard → Site Settings → Environment Variables
-
Add:
NEWS_API_KEY = your_news_api_key
-
-
Run locally with Netlify CLI
npm install -g netlify-cli netlify dev
Runs your app at
http://localhost:8888
and proxies API calls to your serverless function.
- Push your code to GitHub
- Connect the repo to Netlify
- Add the
NEWS_API_KEY
in Netlify’s Environment Variables - Deploy → your app will be live 🎉
Made with Love ❤️ By Kanishka
👉 https://globalink-news.netlify.app/