- Before coding, you should download and install the following development tools if needed :
The easiest way to start is to use RESThub archetypes to create your first HTML5 application. Just open a command line terminal, and type :
mvn archetype:generate -DarchetypeCatalog=http://nexus.pullrequest.org/content/repositories/releases/
Or if you want to use bleeding edge branch :
mvn archetype:generate -DarchetypeCatalog=http://nexus.pullrequest.org/content/repositories/snapshots/
- You will have to choose between the following RESThub archetypes :
- resthub-jpa-webservice-archetype : simple webservice project with JPA persistence
- resthub-mongodb-webservice-archetype : simple webservice project with MongoDB persistence
- resthub-jpa-backbonejs-archetype : simple HTML5 web application with JPA persistence
- resthub-mongodb-backbonejs-archetype : simple HTML5 web application with MongoDB persistence
- resthub-jpa-backbonejs-multimodules-archetype : Multimodules HTML5 web application with JPA persistence (TODO)
- resthub-mongodb-backbonejs-multimodules-archetype : Multimodules HTML5 web application with MongoDB persistence (TODO)
After choosing the right archetype and answering a few questions, your project is generated and ready to use. You can run it thanks to built-in Jetty support :
mvn jetty:run
Check the Todo RESThub 2.0 example in order to learn how to design your RESThub based web application.
- In order to test and run it :
- Download the zip file and extract it
- Run mvn jetty:run
- Open your browser and browse http://localhost:8080/index.html