GithubHelp home page GithubHelp logo

openrota-backend's Introduction

Verify Build Workflow

Quarkus Crud with Postgres & GraphQL

This project is aimed to quickly test the stack :

Clone & build

  • Tests are executed on an H2 database
  • Simply run command mvn clean install

Run it

Run in Dev mode

You can run the app in local environment with command mvn compile quarkus:dev. Dev mode uses H2 database.

Generate and Run JAR

You can run the app with a local postgres database by

  • running docker run --name some-postgres -p 5432:5432 -e DATABASE_PASSWORD=mysecretpassword -d postgres
  • Run mvn clean install in root of your project folder. It generates JAR in target/ folder.
  • Run the JAR with java -jar shareNwork-{$version}-SNAPSHOT-runner.jar

To build production JAR simply run mvn clean package -Pproduction


NOTE

In order to run the mailer, add -Dquarkus.mailer.from=${email} -Dquarkus.mailer.username=${username} -Dquarkus.mailer.password=${password} after mvn compile quarkus:dev or java -jar shareNwork-{$version}-SNAPSHOT-runner.jar . You can find instructions to configure the app password here: https://quarkus.io/guides/mailer-reference#gmail-specific-configuration


Testing H2

The project uses H2 as default database

GraphQl queries

# Visit http://localhost:8080/graphql/schema.graphql to view graphql schema
query getEmployees {
  sharedResource {
     totalExperience
    skillProficiencySet{
      name
      id
    }
  }
}

# Sample Mutations
mutation addEmployee {
  createSharedResource(resource: {
      firstName: "dadada",
      emailId: "[email protected]"
      totalExperience: "12",
      skillProficiencySet: {
        id: 1,
        name: "react"
      }
  
    }
  )
  {
    id,
    emailId
  }
}

openrota-backend's People

Contributors

akumar074 avatar manaswinidas avatar riprasad avatar rishirajanand avatar saumya1singh 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.