Skip to content
hano edited this page Jan 16, 2012 · 3 revisions

Running a application on Apache

The built-in server is good for testing the application in the browser and for test deployment on a target device by typing in the browser of a mobile device: <ip.addres.of your.computer>:port/<appname>

If you want to share the application on your own server e.g.: a Apache you can easily deploy the application on it. Browse to the projects folder and run: espresso build

Espresso will build the project.

Take look in your projects directory, you´ll find a new folder called: build. This folder will contain the built version of your project, included all files an resources. Everytime you execute espresso build, a new build/subfolder is generated with a timestamp of the build.

As long as you dont clear the build folder all staged version of your project are available.

** Deplyoing the application on the Apache**, a short example:

Create a new subfolder in htdocs to store you application

htdocs/<appname>

copy & paste the content of the version you want to deploy from the build/<timestamp> folder

Start the server and browse to: <ip.addres.of your.server>:port/<path/to/applocation> And you almost done.

Using the application offfline:

The application is ready to run on offline, this means that even if the sever is not available the application work. This is don by the included cache.manifest. See also this articel for example: http://www.html5rocks.com/tutorials/appcache/beginner/

The Server have to deliver the offline manifest with correct mime-typ to use the offline feature.

open the file: mime.types, located in etc/mime.types

and add the following entry:

text/cache-manifest manifest

restart the server and give it a try.

Clone this wiki locally