{"id":15170475,"url":"https://github.com/sourabh250/subscribers-mongo-node-main","last_synced_at":"2025-05-14T07:13:06.841Z","repository":{"id":253443527,"uuid":"843495849","full_name":"Sourabh250/Subscribers-Mongo-Node-main","owner":"Sourabh250","description":"A simple API built with Node.js and Express that lets you manage and fetch subscriber details from a MongoDB database. It has endpoints to get all subscribers, just their names, or details for a specific subscriber by ID.","archived":false,"fork":false,"pushed_at":"2024-08-17T11:28:42.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T01:37:27.382Z","etag":null,"topics":["backend","chai","express","mocha","mongodb","mongoose","nodejs","rest-api","swagger"],"latest_commit_sha":null,"homepage":"https://subscribers-mongo-node-main.onrender.com/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sourabh250.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-16T16:36:25.000Z","updated_at":"2024-08-17T11:28:45.000Z","dependencies_parsed_at":"2024-09-14T04:02:41.361Z","dependency_job_id":null,"html_url":"https://github.com/Sourabh250/Subscribers-Mongo-Node-main","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"0d2a28870e3cbbb86da9bc8cfee0b9a5a1788611"},"previous_names":["sourabh250/subscribers-mongo-node-main"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sourabh250%2FSubscribers-Mongo-Node-main","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sourabh250%2FSubscribers-Mongo-Node-main/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sourabh250%2FSubscribers-Mongo-Node-main/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sourabh250%2FSubscribers-Mongo-Node-main/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sourabh250","download_url":"https://codeload.github.com/Sourabh250/Subscribers-Mongo-Node-main/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092836,"owners_count":22013294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","chai","express","mocha","mongodb","mongoose","nodejs","rest-api","swagger"],"created_at":"2024-09-27T08:03:10.610Z","updated_at":"2025-05-14T07:13:06.803Z","avatar_url":"https://github.com/Sourabh250.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Subscribers-Mongo-Node-main\n\nA simple but powerful API built with Node.js and Express that allows you to manage and fetch subscriber details from a MongoDB database. It provides endpoints to retrieve all subscribers, obtain subscriber names, or access details for a specific subscriber by their ID.\n\n## Table of Contents\n\n1. [Technologies/Languages Used](#technologieslanguages-used)\n2. [Installation and Setup](#installation-and-setup)\n3. [Usage](#usage)\n4. [API Endpoints](#api-endpoints)\n5. [Testing](#testing)\n6. [Deployment](#deployment)\n7. [Live API Documentation](#live-api-documentation)\n8. [Contributing](#contributing)\n9. [Author](#author)\n10. [License](#license)\n\n## Technologies/Languages Used\n\n| ![Node.js Logo](https://img.shields.io/badge/Node.js-%E2%9C%94-brightgreen) | ![Express](https://img.shields.io/badge/Express-%E2%9C%94-blue) | ![MongoDB](https://img.shields.io/badge/MongoDB-%E2%9C%94-green) | ![Mocha](https://img.shields.io/badge/Mocha-%E2%9C%94-yellowgreen) | ![Chai](https://img.shields.io/badge/Chai-%E2%9C%94-red) | ![Swagger](https://img.shields.io/badge/Swagger-%E2%9C%94-blueviolet) |\n|:--:|:--:|:--:|:--:|:--:|:--:|\n\n\n- **Node.js** - JavaScript runtime used for building the server-side application.\n- **Express** - Web application framework for Node.js, used to build the API.\n- **MongoDB** - NoSQL database used for storing subscriber data.\n- **Mongoose** - MongoDB object modeling tool for Node.js.\n- **Mocha** - Test framework used for running tests.\n- **Chai** - Assertion library used in conjunction with Mocha for testing.\n- **Swagger UI** - Tool for API documentation and testing.\n\n## Installation and Setup\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/Sourabh250/Subscribers-Mongo-Node-main.git\n    ```\n\n2. Install dependencies:\n    ```bash\n    npm install\n    ```\n\n3. Create a `.env` file at the root and add the following:\nTo run this project, you will need to add the following environment variables to your .env file\n`DATABASE_URL` \u0026 `PORT`.  \nYou can use the provided .env.example file as a reference.\n    ```\n    DATABASE_URL=your_database_connection_string\n    PORT=3000\n    ```\n\n## Usage\n\nTo start the server, run:\n```bash\nnpm start\n```\n\nThis will start the Express server at http://localhost:3000.\n\n## API Endpoints\nGet all subscribers\n```\nGET /subscribers\n```\n| Parameter | Type     | Description                |\n| :-------- | :------- | :------------------------- |\n| `None` | `None` | Retrieves a list of all subscribers. |\n\nGet subscriber names\n```\nGET /subscribers/names\n```\n| Parameter | Type     | Description                |\n| :-------- | :------- | :------------------------- |\n| `None` | `None` | Retrieves a list of subscribers with name and subscribed channel. |\n\nGet specific subscriber by ID\n```\nGET /subscribers/:id\n```\n| Parameter | Type     | Description                |\n| :-------- | :------- | :------------------------- |\n| `id` | `string` | **Required**. ID of the subscriber to fetch. |\n\n## Testing\nTo run the tests, make sure you have Mocha and Chai installed. Then, run the following command:\n```\nnpm test\n```\nThe tests will execute using Mocha and Chai. Test results will be generated and saved in the mochawesome-report folder\n\n## Deployment\nFor deployment, follow these steps:\n\n#### 1. Prepare your environment:\nEnsure that environment variables are set and the database is accessible.\n#### 2. Deploy to your preferred hosting service:\nFor example, you can use platforms like Heroku, AWS, or Render.\n#### 3. Set up deployment scripts if necessary:\nConfigure deployment settings according to your hosting provider's guidelines.\n\n[**Render Link**](https://subscribers-mongo-node-main.onrender.com/)\n\n## Live API Documentation\nExplore the API documentation and interact with the endpoints via Swagger UI:\n- **Local Environment**: [Explore the API documentation](http://localhost:3000/api-docs)\n- **Production**: [Explore the API documentation](https://subscribers-mongo-node-main.onrender.com/api-docs/)\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## Author\n\n- [@Sourabh](https://github.com/Sourabh250) - Developer and maintainer of this project.\n\n## License\nThis project is licensed under the MIT License - see the LICENSE.md file for details.\n\n[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourabh250%2Fsubscribers-mongo-node-main","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsourabh250%2Fsubscribers-mongo-node-main","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourabh250%2Fsubscribers-mongo-node-main/lists"}