Coder Social home page Coder Social logo

yunho0130 / hit-counter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gjbae1212/hit-counter

1.0 1.0 0.0 19.75 MB

:rocket: A simple way to see how many people have visited your website or github project. :tada:

Home Page: https://hits.seeyoufarm.com

License: GNU General Public License v3.0

Go 69.03% Dockerfile 0.58% Shell 1.69% JavaScript 15.62% HTML 12.60% CSS 0.48%

hit-counter's Introduction

HITS

Hits A simple way to see how many people have visited your website or github project.

license Go Report Card

Overview

HITS provides Badge of SVG having format whether script or markdown.

If you will be put Badge on either your website or Github project, the paging count is increased Badge count when people do visit its site.

And Badge involves paging count on both a day(from GMT) and a total(all).

HITS will show Github projects of highest paging count.(TOP 10)

And then HITS show currently visiting projects by users, using Websocket.

HITS made by gjbae1212 using golang, currently serving from google cloud.

How to use

How to generate a svg of badge

You will generate Badge from edit form of url input in HITS.

Hits

Or you could generate a badge by directly writing markdown or html.

# markdown
![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url={your-website or github-project})]

# html
<img src="https://hits.seeyoufarm.com/api/count/incr/badge.svg?url={your-website or github-project}" alt="Hits" />

If you would like to only represent Badge, not to increase paging count, Edit as below url.

# markdown
![Hits](https://hits.seeyoufarm.com/api/count/keep/badge.svg?url={your-website or github-project})]

# html
<img src="https://hits.seeyoufarm.com/api/count/keep/badge.svg?url={your-website or github-project}" alt="Hits" />

If you'd like to change Badge title

Additional query string title={your-change-badge-name}

# example (increase)
![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url={your-website or github-project}&title={your-change-badge-name})]

# example (not increase)
![Hits](https://hits.seeyoufarm.com/api/count/keep/badge.svg?url={your-website or github-project}&title={your-change-badge-name})]

Features

  • Support daily and total badge
  • Show a graph of your site about daily count of histories in recently 6 month
  • Show ranks about github projects.
  • Show stream which count of hits is counting in real time.

How to run your machine

If you'd like to run HITS to your machine

  • Install redis.
  • Set environment export REDIS_ADDRS=REDIS_URL(ex: localhost:6379)
  • Exec $ go build && ./hit-counter
Of course you should modify a little codes associated URL(as hits.seeyoufarm.com) in view/index.html and wasm/main.go

ETC

HITS will increase paging count when getting a badge api is requested.

It will only be to increase paging count in DB(redis), but something as request information(ip, header, ... and so on) don't store in DB(redis).

For only protect abusing increasing a massive of request, part of request information(ip,user-agent) do convert to a value of hashing saved in local-cache and it is deleted after elapsed time.

Inspiration

This project was inspired by brentvollebregt and dwyl.

Added additional features like daily-count, rank, and so on.

LICENSE

This project is following The GPL V3.0.

hit-counter's People

Contributors

gjbae1212 avatar jungdu avatar

Stargazers

Yunho Maeng avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.