Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 0c88cd4cdc

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src/main
.gitignore
Procfile
README.md
pom.xml

README.md

MongoDB-backed Session State Sample

Run Locally

Build the project with Maven:

mvn package

Configure the MONGOHQ_URL environment variable to point to a local MongoDB instance:

  • Linux/Mac

    export MONGOHQ_URL=mongodb://127.0.0.1:27017/test
    
  • Windows

    set MONGOHQ_URL=mongodb://127.0.0.1:27017/test
    

Run

Now you can run your webapp with:

  • Linux/Mac

    $ sh target/bin/webapp
    
  • Windows

    $ target\bin\webapp.bat
    

Try the application in your browser by navigating to:

http://localhost:8080/

Run on Heroku

Install the Heroku Toolbelt

Login to Heroku from the command line

heroku login

In the root directory of this project do the following:

Create the app on Heroku with the "cedar" stack and the free MongoHQ add-on

heroku create --stack cedar --addons mongohq:free

Deploy to Heroku

git push heroku master

Open the application in your browser

heroku open
Something went wrong with that request. Please try again.