Skip to content

A simple web service that generates a dynamic SVG image showing a visitor count. It increments a counter every time the endpoint is called and returns an SVG image displaying the updated count.

License

Notifications You must be signed in to change notification settings

montasim/github-readme-counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

GitHub Readme Counter

GitHub contributors badge GitHub language count badge GitHub top language badge GitHub code size badge GitHub repo size badge GitHub file count badge GitHub open issues badge GitHub closed issues badge GitHub open pull requests badge GitHub closed pull requests badge GitHub active milestones badge GitHub completed milestones badge GitHub license badge GitHub last commit badge GitHub Discussions badge

This project provides a simple web service that generates a dynamic SVG image showing a visitor count. It increments a counter every time the endpoint is called and returns an SVG image displaying the updated count.

๐Ÿ› ๏ธ Requirements to Run the Project

  1. Node.js
  2. Express

๐Ÿš€ Instructions

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

  1. Prerequisites

    You need to have Node.js installed on your machine to run this project. You can download and install Node.js from Node.js official website.

  2. Installing

    Follow these steps to get a development env running:

    1. Clone the repository to your local machine:

      git clone https://github.com/montasim/github-readme-counter.git
    2. Change into the project directory:

      cd github-readme-counter
    3. Install the necessary packages:

      yarn install
    4. Start the server:

      yarn start

      This will start the server on the port specified in your environment variables or default to a system assigned port.

๐Ÿ–ผ๏ธ Using the Service

Once the server is running, you can make a request to the SVG generator endpoint:

https://localhost:3000/count.svg

Default Visitor Count

๐ŸŽจ Customization

This service allows you to customize the appearance of the SVG image through URL parameters. This way, you can easily integrate the counter with different styles and themes of your web pages or applications.

Customizing Colors

The SVG image's background and text colors are customizable through URL parameters. Here are the parameters you can use:

  • backgroundColor: Specifies the hex code for the background color of the SVG. The default color is black (000000).
  • textColor: Specifies the hex code for the color of the text displaying the count. The default color is magenta (EB008B).

Example Usage

To change the background color to white (FFFFFF) and the text color to blue (0000FF), you would access the service using the following URL:

https://localhost:3000/count.svg?backgroundColor=FFFFFF&textColor=0000FF

Customized Visitor Count

Notes on Customization

  • Ensure to provide the color codes without the # symbol as the service automatically handles it.
  • Colors must be provided in hex format.
  • Incorrect or unsupported color values might cause the service to revert to default colors.

๐Ÿค Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

๐Ÿ“– Author

Moon
๏ผญโ™ข๏ผฎ๏ผดฮ›๏ผณ๏ผฉ๏ผญ

๐Ÿ‘ฅ Contributors

Contributors Display

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE.md file for details

๐Ÿ™ Acknowledgments

  1. sagar-viradiya
  2. pufler.dev/badge-it/
  3. github-readme-counter

About

A simple web service that generates a dynamic SVG image showing a visitor count. It increments a counter every time the endpoint is called and returns an SVG image displaying the updated count.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published