GithubHelp home page GithubHelp logo

adikari / todo-ee Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 338 KB

Java EE todo application with gradle build. Is not dependent on IDE for development or deployment

License: Apache License 2.0

Java 70.72% HTML 15.96% CSS 7.63% JavaScript 3.12% Shell 2.58%
java glassfish jax-rs postgres gradle java-ee-7 ejb java-8

todo-ee's Introduction

TODO-EE

Java EE todo application with gradle build. The project is not dependent on IDE for development or deployment.

Requirements

  1. Glassfish server
  2. Postgresql
  3. Gradle
  4. JDK 8 or above

Pre-requisite

  1. Create config file and glassfish password file
    cp config.example config
    cp passwordfile.example passwordfile
  1. Update the values in the config file appropriately.

gfDomain: glassfish domain to use gfUser: Username to log in to glassfish as. gfPasswordFile: Path to password file. Check the password.example

  1. Update Database connection variables in scripts/createresource. Thats the information for glassfish to connect to the database.

  2. Make sure that the database todo is created and postgres is running.

  3. Make sure asadmin is in path. Verify this by typing asadmin --help. If no command found add that to your ``$PATH.

export PATH=$PATH:path_to_glassfish_home/glassfish/bin

Important: Glassfish doesn't come with postgress by default. You will need:

  1. Download the postgres java driver jar from here.
  2. Copy that into path_to_glassfish_home/glassfish/modules/.

First time setup

$ git clone https://github.com/adikari/todo-ee.git
$ cd todo-ee
$ ./scripts/createresource
$ gradle startServer
$ gradle flywayMigrate
$ gradle deploy

Assuming everything went successfully, you can go to http://localhost:8080/todo-rest/ to access the site. The rest api can be accessed at http://localhost:8080/todo-rest/api/.

There are 2 default users seeded to the database. Password is currently saved as plain text. Check the migration script for username and password to login.

Development

Once the initial setup is done, now on you can just use:

$ cd path_to_todo-ee
$ gradle startServer && gradle deploy -t

On file save, the code is automatically compiled, ear is built and deployed to the server. Only need to refresh the browser to see the changes.

TODO

  1. Add browser live reload if web files are changed or added.
  2. Use configuration file to store configuration variables from createresources script.
  3. Implement same api using JAX-WS
  4. Implement same application for both JAX-WS and JAX-RS that can be accessed via different links.
  5. Add token based authentication for JAX-RS

todo-ee's People

Contributors

adikari avatar

Watchers

 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.