https://github.com/psfried/mongo
examples of working with grails and mongodb
https://github.com/psfried/mongo
Last synced: about 1 year ago
JSON representation
examples of working with grails and mongodb
- Host: GitHub
- URL: https://github.com/psfried/mongo
- Owner: psFried
- Created: 2014-11-05T23:03:16.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-11-06T02:51:31.000Z (over 11 years ago)
- Last Synced: 2025-02-10T15:50:54.581Z (over 1 year ago)
- Language: Shell
- Size: 609 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
mongo
=====
examples of working with grails and mongodb
This is a super basic Grails application that uses MongoDB as a database backend.
The examples are laughably simple, but should serve to show how things can be done with MongoDB.
### Build
This app uses grails 2.4.4 and has the grails wrapper included. Run the app with: `./grailsw run-app`.
The only external dependencies are JDK 1.7+ and MongoDB. The datasource in `conf/Datasource.groovy` is setup
for the default MongoDB connnection parameters if you have MongoDB running on your local machine.
### MongoDB
This app depends on MongoDB 2.6.0 or greater. Check out the [MongoDB installation instructions](http://docs.mongodb.org/manual/installation/)
for information on how to install MongoDB. The Linux packages will automatically put the init scripts in the right places so that you
can run mongodb simply by starting the 'mongod' service. For other platforms, you'll need to start it manually and supply the `--dbpath`
option to specify a directory to use for storing the database files: `mongod --dbpath `. The db directory must already exist.
# Where to look for the good stuff
- There's a few domain classes and associated controllers. These should look pretty familiar to anyone who's worked with grails before.
- conf/Bootstrap.groovy Some instances are created and inserted into the database here.
- conf/BuildConfig.groovy shows the plugin dependencies and has comments that will probably save you future headaches.