Coder Social home page Coder Social logo

Comments (6)

hwdsl2 avatar hwdsl2 commented on May 29, 2024 1

There are a few other changes needed for deploying with Go 1.12+, such as the required "main" package (unable to deploy without "package main") and changes in dependency management. See [1]. A rewrite of at least part of the application will likely be needed.

[1] https://cloud.google.com/appengine/docs/standard/go/go-differences

from ga-beacon.

cantrellryan avatar cantrellryan commented on May 29, 2024 1

Yeah, saw that and was able to get past that by renaming the package. But the next steps were beyond my skillset unfortunately.

from ga-beacon.

aravind-j avatar aravind-j commented on May 29, 2024

I have added main.go as suggested in https://cloud.google.com/appengine/docs/standard/go/go-differences#migrating-appengine-sdk. But now with gcolud app deploy it shows the root of you app needs to be package "main" (currently "beacon").

from ga-beacon.

alokc83 avatar alokc83 commented on May 29, 2024

@aravind-j
in your go file, you need to add package main
also, add this method after init

func main() {
        http.HandleFunc("/", indexHandler)

        port := os.Getenv("PORT")
        if port == "" {
                port = "8080"
                log.Printf("Defaulting to port %s", port)
        }

        log.Printf("Listening on port %s", port)
        if err := http.ListenAndServe(":"+port, nil); err != nil {
                log.Fatal(err)
        }
}

but it is failing on appengine import
I have no idea how to fix that

from ga-beacon.

alokc83 avatar alokc83 commented on May 29, 2024

@igrigorik I know you are busy. Do you mind adding new deployment instructions

from ga-beacon.

igrigorik avatar igrigorik commented on May 29, 2024

Resolved via ebbc061

from ga-beacon.

Related Issues (20)

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.