Skip to content

๐Ÿš€ Dynamically showcase your GitHub pinned repositories on your portfolio website with this Node.js Express API.

Notifications You must be signed in to change notification settings

deepsingh132/portfolio-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

GitHub Pinned Repositories API

This Node.js Express application serves as an API to fetch pinned repositories from GitHub, designed specifically for integration with a portfolio website. By using this API, you can dynamically display your GitHub pinned repositories on your portfolio site, keeping it up-to-date with your latest projects.

Table of Contents

Installation

  1. Clone the repository:

    git clone https://github.com/deepsingh132/portfolio-api.git
  2. Navigate to the project directory:

    cd portfolio-api
  3. Install dependencies:

    npm install
  4. Create a .env file in the root directory and add your GitHub access token:

    GITHUB_ACCESS_TOKEN=your-github-access-token

    Note: Ensure your GitHub access token has the repo scope.

  5. Start the server:

    npm start

Usage

Once the server is running, you can make HTTP requests to the specified endpoints to retrieve your pinned repositories.

Endpoints

Get Pinned Repositories

  • Endpoint: /api/v1/github/pinned-repos

  • Method: GET

  • Description: Fetches the pinned repositories from the authenticated user's GitHub account.

  • Example Request:

    curl http://localhost:5000/api/v1/github/pinned-repos
  • Example Response:

    {
      "repos": [
        {
          "name": "project-1",
          "description": "A brief description of project 1.",
          "url": "https://github.com/your-username/project-1"
        },
        {
          "name": "project-2",
          "description": "A brief description of project 2.",
          "url": "https://github.com/your-username/project-2"
        },
        // ...
      ]
    }

Configuration

You can customize the application by modifying the following parameters in the .env file:

  • GITHUB_ACCESS_TOKEN: Your GitHub access token.

Contributing

If you would like to contribute to the project, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

Releases

No releases published

Packages

No packages published