GithubHelp home page GithubHelp logo

gae-clj's Introduction

Clojure on Google App Engine: Hello World

This is a sample project that showcases how to deploy a Clojure web application into Google App Engine.

For a Leiningen version of this project, see the lein branch of this repository.

NOTE: See all the files in this repository for comments regarding the various fiddly bits (app.yaml in particular).

Prerequisites

You must have these command-line tools installed:

Additionally, before continuing, you must authorize Google Cloud SDK Tools.

Steps

These steps assume the project ID of your GCP project is foo-bar-123456. Replace the ID with your own project ID when running these commands.

There are other ways of specifying the project ID. See the gcloud CLI docs.

  1. Create a new Google Cloud Platform project:

    $ gcloud projects create foo-bar-123456
  2. Create a new App Engine app:

    $ gcloud app create --project=foo-bar-123456

    In the prompt that appears, select the region where you want to deploy the app.

  3. Create an uberjar:

    $ clj -A:uberjar
  4. Copy app.yaml into the target directory:

    $ cp app.yaml target
    # This seems a bit inelegant, but I haven't figured out a better way.
    #
    # This is necessary because app.yaml and the deployable artifact need
    # to be in the same directory.
  5. Deploy the application:

    $ gcloud app deploy --project=foo-bar-123456 target
  6. Open the app in your browser:

    $ gcloud app browse --project=foo-bar-123456

    The first request's gonna take a while.

gae-clj's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.