GithubHelp home page GithubHelp logo

vote-counter's Introduction

Vote counter

Development

Please remember to update application.conf.template when adding new configurable properties.

Deployment

Configuration

  1. Create a keystore under src/main/resources with an RSA key, note down the keystore password you pick.

    keytool -genkey -alias '*' -keystore src/main/resources/keystore.jks -keyalg RSA -keysize 2048 -sigalg "SHA1withRSA"
    
  2. Create an application.conf file based on the template.

    NOTE: if you pick a name other than application.conf for your config file, be sure to update the Dockerfile accordingly if you plan on using the Docker image.

  3. Set the vote-counter.web.keystore-password to the keystore password you chose in step 1.

Running

  1. Build the fat JAR:

    sbt assembly
    
  2. Run the JAR manually or use the Docker image. The server listens on 8080 for HTTP and on 8090 for HTTPS requests.

If the devices are configured to send heartbeats, you can view the status of the devices under the /status URL (or see the raw JSON data at /heartbeats).

Running manually

java -cp java -cp target/scala-2.11/vote-counter-assembly-1.0.jar -Dconfig.file=application.conf com.softwaremill.votecounter.web.VoteCounterWeb

Running using the Docker image

  1. Build the image:

    docker build -t softwaremill/vote-counter .
    
  2. Run the image in detached mode with port forwarding enabled:

    docker run -d -P softwaremill/vote-counter
    

vote-counter's People

Contributors

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