GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rmartinus/reactive-anagram

BranchesTags
Open more actions menu

Latest commit

 

History

31 Commits
31 Commits

Folders and files

NameName
Last commit message
Last commit date
gradle/wrapper
gradle/wrapper
 
 
src
src
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
Dockerfile-artifactory
Dockerfile-artifactory
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
artifactory.config.import.yml
artifactory.config.import.yml
 
 
build.gradle
build.gradle
 
 
docker-compose.yml
docker-compose.yml
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

Reactive Anagram

Given a string, respond with a set of all anagram permutations.

Eg.

Input: abc

Output: abc, cab, bca, acb, cba, bac

Endpoints:

  • Make input string uppercase
  • Generate a set of all anagram permutations given a string
  • Save permutation in MongoDB

Built using Spring Reactor and Reactive MongoDB NoSQL database

Starting

Using docker-compose

  • $ ./gradlew clean build
  • $ docker-compose up --build
  • This will run 3 things: mongo, anagram and artifactory
  • Go to http://localhost:8080/anagram/generate/Xyz
  • Check data is inserted
  • Run contract test using spring-cloud-contract
$ docker run --rm -e "APPLICATION_BASE_URL=http://192.168.0.8:8080" -e "PUBLISH_ARTIFACTS=true" -e "PROJECT_NAME=anagram" -e "PROJECT_GROUP=anagram" -e "REPO_WITH_BINARIES_URL=http://192.168.0.8:8081/artifactory/libs-release-local" -e "PROJECT_VERSION=0.0.1.RELEASE" -v "/Users/robbiemartinus/dev/rmartinus/reactive-anagram/src/test/resources/contracts/:/contracts:ro" -v "/Users/robbiemartinus/dev/rmartinus/reactive-anagram/src/test/resources/contracts/output:/spring-cloud-contract-output/" springcloud/spring-cloud-contract:1.2.3.RELEASE
  • Check artifactory has the stubs: http://localhost:8081/artifactory/libs-release-local
  • On the consumer side, you run the stub using spring-cloud-contract-stub-runner
$ docker run --rm -e "STUBRUNNER_IDS=anagram:anagram:0.0.1.RELEASE:stubs:9876" -e "STUBRUNNER_REPOSITORY_ROOT=http://192.168.0.8:8081/artifactory/libs-release-local" -p "8083:8083" -p "9876:9876" springcloud/spring-cloud-contract-stub-runner:"1.2.3.RELEASE"
  • Go to http://localhost:9876/anagram/generate/Xyz
  • You should get the result as stated in contract yml

Manually

  • Start up mongod

    $ sudo mongod

  • Start up app

    $ ./gradlew bootRun

  • Run AnagramWebClient

  • Go to mongo client

    $ mongo

  • Check that data is inserted

    > use anagram

    > db.anagram.find()

About

No description, website, or topics provided.

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.