Giter VIP home page Giter VIP logo

zkmongomaps's Introduction

ZK MVVM Spring Data Mongodb & Google Maps Demo

Build

Build and run the code with:

mvn -Dmaven.test.skip=true package jetty:run

It will run inside of its own jetty server.

You can set the following properties with defaults as shown:

-Djetty.port=8080 
-Dzkmongomaps.mongo.host=localhost
-Dzkmongomaps.mongo.port=27017
-Dzkmongomaps.mongo.db=world
-Dzkmongomaps.mongo.user=zkmongomaps
-Dzkmongomaps.mongo.password=xxx

The defaults are configured within zkmongogmaps.properties

Upon first startup the application will attempt to load its own test data from the file zips.json.gz which was sourced from http://media.mongodb.org/zips.json The one time dataload may take more than a minute.

Note that the code assumes you are running mongod with --auth with a username and password set on the db that the app is using. This matches how mongo runs on a cloud provider such as Redhat Openshift. See the following mongo docs:

Mongo DB - Adding Users

Alternatively you can edit the ZipcodeAppConfig.java to take out the credentials setting line to run your local mongo with the default settings.

Running On Redhat Openshift PaaS Cloud

Openshift Instructions:

# create a diy app
rhc app create zkmongomaps diy-0.1

# add mongo cartridge
rhc cartridge add mongodb-2.2 --app zkmongomaps

# add the demo repo to the local folder created by the 'rhc app' command
cd zkmongomaps
git remote add upstream https://github.com/simbo1905/zkmongomaps.git

# you can check that 'upstream' now points to my demo code and 'origin' points to your cloud server with 
git remote show upstream
git remote show origin

# pull down the demo code (just hit return if asked for a password)
git pull -s recursive -X theirs upstream master

# insure the demo code builds in your servers local folder
mvn -Dmaven.test.skip=true package

# push it up to 'origin' which should be your server and it will build and start the app
git push

# tail the logs in a second window
rhc-tail-files -a zkmongomaps

Inspiration

Tobias Trelle with Spring Data Part 4: Geospatial Queries with MongoDB

Hamid Fadishei with ZK MVVM Design Pattern and Server-Side Paging

See Z60-Gmaps-Bind.zul in the sourcecode for ZK GMaps MVVM API showcasing the test module of zkgmapsz

End.

zkmongomaps's People

Contributors

simbo1905 avatar

Watchers

prateek goel 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.