Coder Social home page Coder Social logo

onehit's Introduction

onehit logo donuts-are-good's followers donuts-are-good's stars donuts-are-good's visitors

onehit

onehit is a hit counter as a service. It provides an HTTP API that allows you to increment and track hits for any arbitrary "key". This can be useful for tracking page views, downloads, or any other metric you want to count.

how it Works

onehit is built on top of libkeva, a lightweight key-value store library for Go. libkeva provides a thread-safe API for storing and retrieving arbitrary data, which makes it a perfect fit for a hit counter service like onehit.

When a GET request is made to a path starting with /x/, onehit increments the hit count for the key specified in the rest of the path. The current hit count for the key is then returned in the response.

usage

To use onehit, simply start the service and make a GET request to the /x/{your-key} endpoint, replacing {your-key} with the key you want to track. For example:

curl http://localhost:3589/x/my-page

This will increment the hit count for "my-page" and return the current count.

deployment

For easy deployment with automatic HTTPS support, try serving onehit with appserve, an easy application server that handles HTTPS for you automatically.

license

mit license 2023 donuts-are-good

onehit's People

Contributors

donuts-are-good avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.