To Get started
- Clone this source to you local machine
Start Mongo in this directory
Load Sample Data into Mongo
mongoimport -d sinatra-mongo-mapper-db -c users seed/users.json
This is a sample application. It can be deployed to Heroku with by making changes to your heroku config, via:
MongoHQ does not support this application. Please read the MongoMapper and Sinatra documentation. As programmers, you get nothing from someone telling you everything -- we would hate to rob you of an opportunity to debug a problem.
We try to put all settings as environmental variables in .rvmrc
If you are a Windows user, you will need to set your environment variables similar to those in .rvmrc
If you are not using .rvmrc, you can still run the following to set your environmental variables
The purpose of the project structure is separation of purposes.
- data/ houses your local MongoDB data for the project, hence the "dbpath" option with mongod above.
- initializers/ is a convenient directory for initializing settings for different modules of the application
- models/ contains the MongoMapper models
- seed/ contains some seed data that you would like to use to bootstrap your project
- views/ contains the HAML files that generate your output