Code Monkey home page Code Monkey logo

grails-petclinic's Introduction

Grails Pet Clinic application

This is a Grails port of the standard Spring Pet Clinic web application. It's very simple, consisting of a few domain classes for persistence and three controllers to support the user interface.

The application uses the Cloud Foundry Grails plugin to discover the database service bound to the application when pushed to Cloud Foundry, as described in the Cloud Foundry documentation.

The domain model

This is the basic domain model for the Pet Clinic application:

           Person               Clinic
          /      \
      Owner      Vet
        |         |
       Pet    Speciality
      /   \
PetType  Visit

An Owner has many Pets, which in turn has many Visits and a PetType. A Vet has many Specialitys. Clinic is on its own, but has a controller dedicated to it.

Building and running locally

To build and run this application, use the following command:

$ ./grailsw run-app

This will start the application in development mode and use an in-memory HSQLDB database.

Note: The first time the ./grailsw command is run, it will take a while to download the Grails framework. Subsequent Grails commands will run much faster.

Deploying to Cloud Foundry

To run the application on Cloud Foundry, first build the project into a .war file:

$ ./grailsw prod war

After installing the 'cf' command-line interface for Cloud Foundry, targeting a Cloud Foundry instance, and logging in, the application can be pushed using these commands:

$ cf push

When using the provided manifest.yml file, a MySQL service will be created and bound to the app when it is pushed. You can choose a different MySQL service or a PostgreSQL service to bind to the application.

grails-petclinic's People

Contributors

scottfrederick avatar andypiper avatar

Watchers

James Cloos avatar Matt Jeffries Pivotal 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.