Skip to content

akumar074/shareNwork-backend

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Verify Build Workflow

Quarkus Crud with Postgres & GraphQL

This project is aimed to quickly test the stack :

Clone & build

  • The project uses Java 11 and Maven 3.8.6+. Make sure you have these installed before building the project.
  • Tests are executed on an H2 database
  • Simply run command mvn clean install on root folder after cloning.

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 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: "anand@easa.com"
      totalExperience: "12",
      skillProficiencySet: {
        id: 1,
        name: "react"
      }
  
    }
  )
  {
    id,
    emailId
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 96.7%
  • Makefile 3.0%
  • HTML 0.3%