This is a Single Page Application (SPA) built with React + Vite, that allows users to search and browse news articles from The New York Times.
Live demo: https://nytsearch.netlify.app
- 🔍 Search articles from The New York Times API
- 📄 View article headlines, publication dates, and authors
- 📱 Responsive layout using Tailwind CSS
- 📚 Pagination support
- 💬 Smooth user experience with loading indicators
- ☁️ API requests via Axios
git clone https://github.com/zakymzn/search-news-articles.git
cd search-news-articlesnpm installThis project uses a New York Times Developer API Key. Create a .env file at the root of the project based on the example.
cp .env.example .envThen edit .env and replace with your own key.
VITE_API_KEY=your_api_key_hereYou can get your API key by registering at https://developer.nytimes.com.
npm run devIf you want to deploy this project (e.g. to Netlify or Vercel):
- Add the environment variable
VITE_API_KEYin the platform's Environment Variables settings - Then trigger a build or redeploy
🔐 Your .env is ignored in version control by default to protect sensitive information.
To run functional and API tests (if configured):
npm run testMa'mur Zaky Nurrokhman
- GitHub: zakymzn
- LinkedIn: linkedin.com/in/zakymzn