Skip to content

Geethapranay1/news-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

News Backend

This is the backend system for a News client application, developed using Express.js and MongoDB.

Features

  1. Story Endpoints:

    • Fetch stories, including categories such as top, new, and best stories.
    • Implement pagination and sorting for stories.
  2. Comment Endpoints:

    • Fetch comments for a selected story.
    • Implement pagination and sorting for comments.
  3. User Management:

    • Fetch user profiles, displaying relevant information such as user's submissions, comments, creation date, and karma points.
    • Implement user authentication and authorization mechanisms.
    • Allow users to bookmark their favorite stories or comments.
  4. Search Functionality:

    • Implement search functionality to allow users to search for stories or comments by keywords.
  5. Error Handling and Logging:

    • Implement robust error handling and logging for better debugging and user experience.

Getting Started

  1. Clone the repository:

ex: git clone https://github.com/your-username/Backend.git

  1. Install dependencies: npm install

  2. Set up environment variables:

  • Create a .env file in the project root directory.
  • Add the following variables:
    MONGODB_URI=your-mongodb-connection-string
    JWT_SECRET=your-jwt-secret
    
  1. Start the server: The server will start running on http://localhost:3000.

Technologies Used

  • Backend Framework: Express.js
  • Database: MongoDB
  • Authentication: JSON Web Tokens (JWT)
  • Error Handling: Custom error handling middleware
  • Logging: Console logging

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors