A simple Node.js and Express.js project that counts the number of visitors to your GitHub profile or repository. The count updates every time someone visits the deployed link.
- Tracks and displays visitor count
- Simple API to retrieve the count in JSON format
- Easy to deploy on platforms like Render or Replit
- A Node.js server keeps track of visitors in a text file.
- Every time someone accesses the
/endpoint, the count increases. - The
/countendpoint returns the current visitor count in JSON format. - A badge in your
README.mddynamically updates with the visitor count.
git clone https://github.com/robin-ivi/github-profile-views.git
cd github-visitor-counternpm installnode index.js- Open
http://localhost:3000/in your browser to see the visitor count. - Visit
http://localhost:3000/countto get the count in JSON format.
- Go to Render.
- Create a New Web Service and link this repository.
- Set Build Command to:
npm install
- Set Start Command to:
node index.js
- Deploy and note your public URL.
- Go to Replit.
- Create a New Repl and select Node.js.
- Paste the
index.jscode and click Run. - Copy the Replit URL.
Once deployed, add this to your README.md:
This will dynamically update the visitor count every time someone views your profile!
| Endpoint | Description |
|---|---|
/ |
Displays the total visitor count |
/count |
Returns the count in JSON format |
This project is open-source and available under the MIT License.
💡 Need help? Feel free to reach out!