RESTful API
The project contains a RESTful API for getting information about YouTube channel subscribers.
The project contains a RESTful API for getting information about YouTube channel subscribers.
The project is well thought structured and also contains many comments to understand it easy.
The backend project is developed using Node.js and Express framework.
The project uses MongoDB as the database for managing the subscriber data.
youtube link -https://youtu.be/3kREIbfjxPA?si=V7aGN-iafDqCAz6p
deployment link -https://get-subs-2.vercel.app/
This is a straightforward backend project that includes a RESTful API designed to provide information about YouTube channel subscribers. The project is built using Node.js and Express, and it utilizes MongoDB as the database to manage subscriber data. The subscriber's data encompasses various fields, including their ID, Names, Subscribed Channels, and Subscription Date.
That allow users to retrieve data in JSON format. These endpoints include:
The project also deals with error situations, as when a user reaches an unidentified endpoint or when the payload is entered incorrectly sended.
├───public
├───resources
└───src
├───database
├───models
└───views
To ensure convenience, we will be using the placeholder protocol://domain.tld/
as the host URL in the documentation and comments. Please replace it with your actual host URL, such as http://localhost:5000/,
in the subsequent steps of the documentation.
This endpoints will render our beautiful home page.
# Endpoint
GET protocol://domain.tld/
# Try Your Self
$ curl -X GET protocol://domain.tld/
This endpoint retrieves an array of all subscribers from the database.
# Endpoint
GET protocol://domain.tld/subscribers
# Try Your Self
$ curl -X GET protocol://domain.tld/subscribers
This api endpoint retrieves an array of subscribers with only two fields: their name and subscribed channel.
# Endpoint
GET protocol://domain.tld/subscribers/names
# Try Your Self
$ curl -X GET protocol://domain.tld/subscribers/names
This api endpoint returns the details of the subscriber whose ID is provided in the endpoint.
# Endpoint
GET protocol://domain.tld/subscribers/:id
# Try Your Self
$ curl -X GET protocol://domain.tld/subscribers/:id
This endpoint returns an error since we cannot find any matching route with the request.
# Endpoint
ANY protocol://domain.tld/{ANY-PATH-WHICH-DOES-NOT-MATCH-WITH-ABOVE-ENDPOINTS}
# Try Your Self
$ curl -X GET protocol://domain.tld/{ANY-PATH-WHICH-DOES-NOT-MATCH-WITH-ABOVE-ENDPOINTS}
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Minimal (dependent on Npm, NodeJs)
Ensure your system meets the following requirements:
PACKAGE | WHY REQUIRED? | SITE |
---|---|---|
NPM | Installing npm packages | LINK |
NODE | Running Nodejs | LINK |
ExpressJs | Web application framework | LINK |
MongoDB | Storing databases | LINK |
Mongoose | schema-based solution to model | LINK |
We recommend that you have a basic understanding of Node.js
# Clone the repository
$ git clone https://github.com/Priyanshunegi5/get-subs.git
$ cd get-subs
# Update env file
$ cp .env.example .env
# Update env file According to comments
$ nvim .env
# Install dependency
$ npm install
# Seed database with sample documents
$ node src/createDatabase.js
# Run the dev server
$ npm run dev-start
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
#[type]/PR description
Added
, Updated:
, Fixed:
etc.#[issue] PR title -> #90 Fixed styles the button
In order to ensure that the GetYoutubeSubscribers community is welcoming to all, please review and abide by the Code of Conduct.
If you discover a security vulnerability within GetYoutubeSubscribers, please send an e-mail to Raman Verma via e-mail.
All security vulnerabilities will be promptly addressed.
The GetYoutubeSubscribers is open-sourced software licensed under the MIT License
In case you have any questions that are beyond the scope of the included help file, please feel free to email me via my @email