Cordova + Sling blog app
A simple blog app built with Cordova and powered by Sling.
As a first step, launch Sling.
The Sling Container can be launched by running the following command in the launchpad/builder/target directory: $ java -jar org.apache.sling.launchpad--standalone.jar so if the current version is 7, the command should be: $ java -jar org.apache.sling.launchpad-7-standalone.jar
This launches sling on the default port: 8080.
$ cd server/path-based-rtp $ mvn clean install -P autoInstallBundle
$ cd ../espblog $ mvn clean install -P autoInstallBundle
To verify that the bundle is correctly installed:
http://localhost:8080/apps/espblog/html.esp must return the html.esp script.
Log in by visiting http://localhost:8080/?sling:authRequestLogin=true, using username=admin and password=admin
The console at http://localhost:8080/system/console/bundles must list both the following bundles as active:
Apache Sling ESP blog sample (org.apache.sling.samples.espblog) Apache Sling Sample Path Based Resource Type Provider (org.apache.sling.samples.path-based.rtp)
How to blog (from your browser)
Head to http://localhost:8080/content/espblog/*.html. Use the 'New Post' link on the left to create a new post.
- node.js version
- Cordova CLI version
- (iOS only) Xcode version
- (iOS only) ios-sim
- (Android only) Apache Ant
- (Android only) Android SDK
- (cloud build only) PhoneGap Build account
If you have the build toolchain installed (Android users: replace
$ cordova platform add ios $ cordova build ios
$ cordova emulate ios
Check out the Cordova CLI docs for more details, including installing onto a device.
Alternatively, use PhoneGap Build to build the app for a number of platforms in the cloud (note: some platforms require keys to be uploaded beforehand):
- Log in to PhoneGap build using your Adobe ID
- Tap the '+ new app' button
- Enter the URL to this github repository (https://github.com/blefebvre/cordova-sling-blog-sample)
- Tap 'Pull from .git repository'
- When it finishes fetching, tap 'Ready to build'
- Once each platform finishes compiling you may scan the QR code with a device to download and install your app.