Skip to content

How to create a google app engine project

macourtney edited this page Oct 19, 2010 · 2 revisions

Creating a Google App Engine Project

To create a Conjure project for use in Google App Engine, you first must create the Leiningen project and add conjure core and lein conjure as dependencies.

lein new hello_world

project.clj example:

(defproject hello_world "1.0.0-SNAPSHOT"
  :description "FIXME: write"
  :dependencies [ [ org.clojure/clojure "1.1.0" ]
                 [ org.clojure/clojure-contrib "1.1.0" ]
                 [ conjure-core "X.X.X" ] ]
  :dev-dependencies [ [ lein-conjure "X.X.X" ] ])

In the above example X.X.X refers to the current version of conjure-core and lein-conjure. You can find the latest version of each library on clojars at: conjure-core and lein-conjure

Finally, run the Leiningen deps command to download all of the Conjure dependencies.

lein deps

Making a new Conjure project with the Google App Engine data store

To create your Conjure project with the Google App Engine data store for a database run the following command:

lein conjure new -database google-app-engine

Generating a war file and loading it into Google App Engine

The next thing you'll need to do is generate a war file from your project then copy it over to your Google App Engine install and extract its contents.

To generate a war file use:

lein uberwar

Next copy the war file into a directory called "war" either on your app engine server or locally if you're using the app engine development environment. Extract the contents of your war file into the war directory. Finally, start your Google App Engine development environment script or otherwise point app engine at your war directory, and you should see your application.

Clone this wiki locally