Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A simple Java REST app using backbone.JS for CloudBees

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 src
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 clickstart.json
Octocat-spinner-32 icon.png
Octocat-spinner-32 pom.xml
README.md

backbone.js and RESTful backend (JAX-RS)

Backbone.js (http://backbonejs.org/) is a popular lightweight javascript framework for giving structure to complex javascript client-side applications. This works nicely with restful frameworks at the back end (the back end is a set of restful services). When you launch this ClickStart, it will create a Javascript/Backbone app, a source repo with continuous deplopyment via Jenkins, and a database.

Feel free to use this as a starter project. Launch the clickstart, clone the repo and every change you push will be built and deployed.

To deploy this manually:

Clone the app locally

git clone git://github.com/CloudBees-community/java-rest-backbone.git myapp

Verify it runs locally (this uses in-memory storage by default)

cd myapp
mvn bees:run

Deploy the app to CloudBees (as WAR)

mvn bees:deploy -Dbees.appid=MY_APPID

Deploy the app to CloudBees (as source)

bees app:create --withCD MY_APPID
[... your new CLOUDBEES GIT URL will be printed ...]
git remote add cloudbees YOUR_NEW_CLOUDBEES_GIT_URL
git push cloudbees master

Bind the app to a database

Create a database

bees db:create -u MY_DB_USER -p MY_DB_PASS MY_DATABASE_ID

Bind the database to the app

bees app:bind -db DATABASE_ID -a MY_APPID -as words

Reconfigure the app to run in database mode, instead of in-memory. Note: "mode" is looked up as a ServletContext param by the app

bees config:set -a MY_APPID mode=db

Restart the app to apply new settings and resource bindings

bees app:restart -a MY_APPID
Something went wrong with that request. Please try again.