Giter Site home page Giter Site logo

counter's Introduction

Counter

Counter is a web application that increases the value of a counter every time it is clicked.

Configuration

Mount Point

The service can be mounted with a specific mount point (prefix path). This path can be forwarded from the load balancer as the header X-Mount-Point or it can be given as a environment variable, COUNTER_MOUNT_POINT, when starting the container.

Stores

The application supports four different stores, they are configured with environment variables.

Memory

This is the default store. It stores the counter in memory and is reset on every restart.

# With binary
$ counter-linux

# With docker
$ docker run -d andersjanmyr/counter

Redis

Stores the counter in Redis. It is configured by setting the environment variable REDIS_URL to a Redis endpoint such as localhost:6379

# With binary and local Redis
$ REDIS_URL=localhost:6379 counter-linux

# With docker and local Redis
$ docker run -d -e REDIS_URL=localhost:6379 andersjanmyr/counter

# Or with link, assuming a Redis container named redis is running
docker run -d --link redis -e REDIS_URL=redis:6379 andersjanmyr/counter

Mongo

Stores the counter in Mongo. It is configured by setting the environment variable MONGO_URL to a Mongo endpoint such as localhost:27017

# With binary and local Mongo
$ MONGO_URL=localhost:27017 counter-linux

# With docker and local Mongo
docker run -d -e MONGO_URL=localhost:27017 andersjanmyr/counter

# Or with link, assuming a Mongo container named mongo is running
docker run -d --link mongo -e MONGO_URL=mongo:27017 andersjanmyr/counter

Postgres

Stores the counter in Postgres. It is configured by setting the environment variable POSTGRES_URL to a postgres endpoint such as postgres://localhost

# With binary and local Postgres
$ POSTGRES_URL=postgres://localhost counter-linux

# With docker and local Postgres
docker run -d -e POSTGRES_URL=postgres://localhost andersjanmyr/counter

# Or with link, assuming a Postgres container named postgres is running
docker run -d --link postgres -e POSTGRES_URL=postgres://postgres@postgres andersjanmyr/counter

counter's People

Contributors

andersjanmyr avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

stigkj

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.