GithubHelp home page GithubHelp logo

brunoshiroma / get-started-go Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ibm-cloud/get-started-go

0.0 0.0 0.0 3.94 MB

License: Apache License 2.0

Go 33.41% CSS 3.86% HTML 42.70% Makefile 3.23% JavaScript 10.96% Dockerfile 5.86%

get-started-go's Introduction

Getting started with Go on IBM Cloud

To get started, we'll take you through a sample Go hello world app, help you set up a development environment and deploy to IBM Cloud.

The following instructions are for deploying the application as a Cloud Foundry application. To deploy as a container to IBM Cloud Kubernetes Service instead, see README-kubernetes.md

Prerequisites

You'll need the following:

1. Clone the sample app

Now you're ready to start working with the simple Go hello world app. Clone the repository and change to the directory where the sample app is located.

git clone https://github.com/IBM-Cloud/get-started-go
cd get-started-go

Peruse the files in the get-started-go directory to familiarize yourself with the contents.

2. Run the app locally

Build and run the app.

go run get-started-go.go

View your app at: http://localhost:8080

3. Prepare the app for deployment

To deploy to IBM Cloud, it can be helpful to set up a manifest.yml file. One is provided for you with the sample. Take a moment to look at it.

The manifest.yml includes basic information about your app, such as the name, how much memory to allocate for each instance and the route. In this manifest.yml random-route: true generates a random route for your app to prevent your route from colliding with others. You can replace random-route: true with host: myChosenHostName, supplying a host name of your choice. Learn more...

applications:
- name: GetStartedGo
  random-route: true
  memory: 128M

4. Deploy the app

You can use the IBM Cloud CLI to deploy apps.

ibmcloud login
ibmcloud target --cf

From within the get-started-go directory push your app to IBM Cloud

ibmcloud cf push

This can take a minute. If there is an error in the deployment process you can use the command ibmcloud cf logs <Your-App-Name> --recent to troubleshoot.

When deployment completes you should see a message indicating that your app is running. View your app at the URL listed in the output of the push command. You can also issue the

ibmcloud cf apps

command to view your apps status and see the URL.

get-started-go's People

Contributors

kevin-ortega avatar rvennam987 avatar rvennam avatar rxu1 avatar zzdrt avatar opiethehokie 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.