Code Monkey home page Code Monkey logo

bluemixdeployment's Introduction

#Go Hello World Overview

This app is a hello world plus a little big of basic functionality using Golang. The application uses Gin-Gonic for the app router and for templating.

Also check out a blog post on this topic as well for a more in depth look at Go and Gin-Gonic.

Build Status

Build Status Bluemix Deployments

Running the app on Bluemix

You can deploy your own instance of Go Hello World app to Bluemix. To do this, you can either use the Deploy to Bluemix button for an automated deployment or follow the step below to create and deploy your app manually.

Deploy to Bluemix

  1. Install Go. If you have Go installed skip to step 2.

  2. Create a Bluemix Account

    Sign up for Bluemix or use an existing account.

  3. Download and install the Cloud Foundry CLI tool

  4. cd into the $GOPATH/src directory

cd $GOPATH/src
  1. Clone the app to your local environment from your terminal using the following command:
git clone https://github.com/IBM-Bluemix/go-hello-world.git
  1. cd into this newly created directory
cd go-hello-world
  1. Compile the Go code:
$ make
  1. Open the manifest.yml file and change the host value to something unique

The host you choose will determinate the subdomain of your application's URL: <host>.mybluemix.net

  1. Connect to Bluemix in the command line tool and follow the prompts to log in:
$ cf api https://api.ng.bluemix.net
$ cf login
  1. Deploy your app to Bluemix:
$ cf push

And voila! You now have your very own instance of the Go Hello World app running on Bluemix.

Run the app locally

  1. Install Go. If you have Go installed skip to step 2.

  2. cd into the $GOPATH/src directory

cd $GOPATH/src
  1. Clone the app to your local environment from your terminal using the following command:
git clone https://github.com/IBM-Bluemix/go-hello-world.git
  1. cd into this newly created directory
cd go-hello-world
  1. Compile the Go code:
$ make

Your app will be automatically be available on port 8080. To access the app, go to localhost:8080 in your browser. Happy developing!

Contribute

We are more than happy to accept external contributions to this project, be it in the form of issues and pull requests. If you find a bug, please report it via the Issues section or even better, fork the project and submit a pull request with your fix! Pull requests will be evaulated on an individual basis based on value add to the sample application.

Troubleshooting

The primary source of debugging information for your Bluemix app is the logs. To see them, run the following command using the Cloud Foundry CLI:

$ cf logs go-hello-world --recent

For more detailed information on troubleshooting your application, see the Troubleshooting section in the Bluemix documentation.

Privacy Notice

The go-hello-world sample web application includes code to track deployments to Bluemix and other Cloud Foundry platforms. The following information is sent to a Deployment Tracker service on each deployment:

  • Application Name (application_name)
  • Space ID (space_id)
  • Application Version (application_version)
  • Application URIs (application_uris)

This data is collected from the VCAP_APPLICATION environment variable in IBM Bluemix and other Cloud Foundry platforms. This data is used by IBM to track metrics around deployments of sample applications to IBM Bluemix. Only deployments of sample applications that include code to ping the Deployment Tracker service will be tracked.

Disabling Deployment Tracking

To disable deployment tracking for this app remove the following 2 lines line 5 and line 13 in go-hello-world.go

bluemixdeployment's People

Contributors

jsloyer avatar vaibhavnarkhede12 avatar rvennam avatar ank-cr avatar

Watchers

James Cloos 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.