/servlets-quickstart

The intention of this repository is to serve as a template for building a Servlet project using the Gradle Jetty plugin.

Primary LanguageJavaMIT LicenseMIT

Servlets Example Using the Gradle Jetty Plugin

Build Status

This guide will show you how to build a servlets application with Gradle and the Jetty Plugin.

Prerequisites

  • Java and Git.
  • An installed version of Postgres to run the application locally.

Local Development

  1. First clone this repository and cd into it.

    $ git clone git@github.com:acamino/servlets-quickstart.git
    $ cd servlets-quickstart
  2. Create the database.

    $ createdb servlets_quickstart
  3. Copy the .env.example file to .env, and edit it including your credentials. Run source .env to export the environment variables.

  4. Run the migrations.

    $ ./gradlew flywayMigrate
  5. Start the server.

    $ ./gradew jettyRun
  6. Check it out at http://localhost:8080

Issues & Support

Please file tickets for bug or problems.

Contributing

Edits and enhancements are welcome. Just fork the repository, make your changes and send me a pull request.