Has anyone actually deployed an Ionic app to the web?

Just saw this:

Yes, its pretty easy to deploy Ionicapps to the web. Here is a gradle build I cooked up to make it even easier. It generates a war file that you can then deploy. It can be enhanced to do even more:

/* ============================================================================
This file contains the configurations for
Eclipse and Webapp settings
Author: agyepong

Included from: “${rootProject.projectDir}/build.gradle”

*/

apply plugin: 'eclipse’
apply plugin: ‘war’

ext {
appName = 'ionicapp’
builddir = "${appName}/build"
contentdir = “${appName}/WebContent”
}

task copyTask(type : Copy) {
from '…/www’
into contentdir
}

war {
destinationDir = new File(builddir)
webAppDirName = contentdir
archiveName = “${appName}.war”
}

/* ensure eclipse source folders are always created, even when not inside GIT */
def eclipseSourceFolders=[
builddir,
contentdir,
];

tasks.eclipse.dependsOn << {

for (String sourceFolder: eclipseSourceFolders){ 
	def resourceDir = new File(project.projectDir, sourceFolder)
	if( !resourceDir.exists() && ! resourceDir.mkdirs() ) {
		logger.info("Not able to create %1",resourceDir);
	}
}

}

/* To have javadocs in eclipse added - where no source are available - we need these lines:

/* setup eclipse with project encoding as UTF-8 (for editors) */
eclipseJdt.doLast {
File f = file(’.settings/org.eclipse.core.resources.prefs’)
f.write(‘eclipse.preferences.version=1\n’)
f.append(‘encoding/=utf-8’)
}

Couldnt agree more. Handrolling anything, when a knowledge of the framework takes you pretty much there, is just setting yourself - and whoever has to maintain your code - up for living hell. I dont think Ive ever seen anyone say “I just wrote my own [state management]/[navigation/[injection]/[etc]” followed by “and use it in all my apps”. Not once. Just words like [headache]/[pain]/[nightmare]/[just shoot me now] and my personal favorite [didnt have time for error handling]

@MarkAurit Which post exactly are you agreeing with? :slight_smile:

Here is my deployed Ionic web app. It runs on Chrome because it needs Bluetooth.
https://aircable.co/page/sppovergatt

I decided to use a simplified preview.html file to limit the look to a smartphone app
and integrated it into the looks of our web siite.

If you run the app directly click here:
https://aircable.co/aircable_images/static/SPPoverGATT/index.html
or https://aircable.co/aircable_images/static/SPPoverGATT/preview.html

When I build the app, I do ionic cordova build browser --prod
and then copy the platform/browser/www directory to the server.

Information about the app: