Giter Club home page Giter Club logo

spring-kotlin-skeleton's Introduction

Simple Spring Web App, using Kotlin and Gradle

This is minimal webapp built using:

  • Spring Boot
  • Kotlin (not Java)
  • Gradle (not Maven (mvn))
  • PostgreSQL

Purpose

As a template or starter for a larger webapp, with nontrivial, yet minimal, dependencies.

To test deployment to various cloud providers.

Requirements

  • Java 21
  • Access to a PostgreSQL database connection credentials

Building and Running

  1. Copy envrc-template to a file (.envrc is already in .gitignore, so that's safe) and fill-in the missing credentials.

  2. Set the environment variables.

    source .envrc
  3. Build.

    ./gradlew build
  4. Run.

    ./gradlew bootRun
  5. Visit the running app at http://localhost:8080.

Roadmap

  • Add Spring Security.
  • Add a frontend (e.g. React).

Issues

  • Trying to get deployed to Heroku. Current error:

    2024-07-01T05:36:11.736554+00:00 heroku[web.1]: State changed from crashed to starting
    2024-07-01T05:36:16.403547+00:00 heroku[web.1]: Starting process with command java -Dserver.port=51142 $JAVA_OPTS -jar build/libs/ktskull-0.0.1-SNAPSHOT.jar
    2024-07-01T05:36:17.034937+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
    2024-07-01T05:36:17.039819+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx300m -Xss512k -XX:CICompilerCount=2 -Dfile.encoding=UTF-8
    2024-07-01T05:36:17.103389+00:00 app[web.1]: Error: Could not find or load main class com.example.ktskull.AppKt
    2024-07-01T05:36:17.103390+00:00 app[web.1]: Caused by: java.lang.ClassNotFoundException: com.example.ktskull.AppKt
    2024-07-01T05:36:17.174760+00:00 heroku[web.1]: Process exited with status 1
    2024-07-01T05:36:17.198709+00:00 heroku[web.1]: State changed from starting to crashed

spring-kotlin-skeleton's People

Contributors

cschuyle avatar

Watchers

 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.