Network/tutorials/quick-start-bundle

= Installing and running the quickstart bundle =

The quickstart bundle is a standalone packaging of the user service, wallet service and the backoffice application in an Apache Tomcat container.

1 minute install
IMPORTANT NOTE: The bundle currently won't work on Java 1.7. Use Java 1.6 instead.


 * 1) download and unpack the bundle
 * 2) change working directory to:
 * 3) start tomcat with   (Unix) or   (Windows)
 * 4) access the backoffice by visiting: http://localhost:8080/backoffice-web
 * 5) log in with user: admin, password: admin

Complete! Now you should have a working Cubeia Network. See the next section for some examples of how to add some test data.

Testing it out
Get an overview of available graphical interface URL's here: http://localhost:8080

The User Service REST API is located at URL: http://localhost:8080/user-service-rest/rest The Wallet Service REST API is located at URL: http://localhost:8080/wallet-service-rest/rest

To add some test users to the user service you can modify and run the included shell script.

A good way to explore the REST api:s is to use a REST client GUI or the command line tool curl.

The full API documentation can be found here.

Some examples with curl (note: the below examples work on Unix, for Windows see curl on windows):

Example 1: Getting a user by id curl -XGET http://localhost:8080/user-service-rest/rest/user/id/1003

Example 2: Create a user curl -XPOST -H "Content-type: application/json" http://localhost:8080/user-service-rest/rest/users -d ' { "user" : { "userName" : "snubben", "operatorId" : "1", "userInformation" : { "billingAddress" : "Norrgatan 13", "city" : "Stockholm", "country" : "Sweden" } },   "password" : "pwd" }'

Example 3: Search for a user with screen name starting with "snu" curl -XPUT -H "Content-type: application/json" http://localhost:8080/user-service-rest/rest/users/search/query -d ' { "screenName" : "snu%", "order": "ID", "ascending" : "false", "queryLimit" : "10", "queryOffset" : "0" }'

TIP: If you are using curl have Python v2.6 or later installed you might want format the returned JSON by piping the output to.

Configuration overview
Datasources are configured as JNDI-resources in: and. The default configuration uses a H2 database with file storage. The database files are located in the  directory relative to the current working directory when starting tomcat.

Service URL:s used by the backoffice application are configured in.

Backoffice users are configured in.

More information can be found at:
 * http://www.cubeia.org/index.php/network/network-docs
 * http://www.cubeia.com/index.php/products/cubeia-network
 * http://www.cubeia.org/index.php/network