Git Product home page Git Product logo

sparkapp's Introduction

sparkapp

Build Status

Spark Java micro framework based application. Spark Framework is a simple and lightweight Java web framework built for rapid development.

Spark is built around Java 8's lambda philosophy, which makes a typical Spark application a lot less verbose than most application written in other Java web frameworks.

Getting started

This project uses the gradle build tool. For a quickstart you need to follow these simple steps:

git clone [email protected]:kuffel/sparkapp.git    
cd sparkapp
// To list all available tasks use
./gradlew tasks
// To create a fat jar file with the complete application 
./gradlew shadowJar              

Shadow Jar allows an easier distribution of java applictions. To start this application you can simply use this command:

cd [PROJECT_DIR]/build/libs
java -jar sparkapp.jar

For further instructions on using the Spark framework read the official documentation

sparkapp.jar

The generated jar file provides some cli options to create and pass a configuriation file for your service instance.

$ java -jar sparkapp.jar -h
usage: java -jar sparkapp.jar [-c <config.json>] [-h] [-i] [-v]
 -c,--config <config.json>   Path to config.json
 -h,--help                   Show usage and help information
 -i,--init                   Create empty template config.json
 -v,--version                Display current application version

For production deployments with your own configuration just start the service with your own config.json.

To generate a new config.json run java -jar sparkapp.jar -i

If you do not provide any config this values will be uses as defaults:

{
    "name" : "sparkapp",
    "version" : [CURRENT VERSION STRING],        
    "secret" : [RANDOM STRING],                
    "port" : 9999
}

References

Spark Java Website

Gradle

Shadow Jar

sparkapp's People

Contributors

kuffel avatar

Watchers

James Cloos 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.