Welcome to the Node.js Server powering the Blog Platform! This server provides a robust, scalable, and secure backend for managing article posts and AI converstation.
- RESTful API for blog operations (CRUD)
- Input validation and error handling
- CORS support for frontend integration
- Environment-based configuration
git clone https://github.com/your-username/article-server.git
cd article-server
npm installnpm run devServer runs on http://localhost:3001
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/home-screen |
Get home screen data (articles, prompts, etc.) |
| GET | /api/current-articles |
List all current articles |
| GET | /api/popular-articles |
List all popular articles |
| GET | /api/search-suggestions |
Get article title suggestions (query param q) |
| GET | /api/search-results |
Search articles with pagination (q, page, limit) |
| GET | /api/article/:id |
Get a single article by ID |
| GET | /api/all-prompts |
List all prompts |
| GET | /api/chat |
Get AI chat response (query param q) |
- Fork the repository
- Create your feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -m 'Add feature') - Push to the branch (
git push origin feature/YourFeature) - Open a Pull Request
This project is licensed under the MIT License.
Happy Coding!