This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"github.com/graphql-go/graphql" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"github.com/graphql-go/graphql" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
) | |
func main() { | |
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_autoscaling_group" "example" { | |
launch_configuration = "${aws_launch_configuration.example.id}" | |
load_balancers = ["${aws_elb.example.name}"] | |
availability_zones = ["eu-west-1b", "eu-west-1a"] | |
min_size = 2 | |
max_size = 5 | |
tag { | |
key = "Name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
region = "eu-west-1" | |
} | |
data "aws_availability_zones" "available" {} | |
resource "aws_security_group" "instance" { | |
name = "go-api-instance" | |
ingress { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
access_key = "ACCESS_KEY_HERE" | |
secret_key = "SECRET_KEY_HERE" | |
region = "us-east-1" | |
} | |
resource "aws_instance" "example" { | |
ami = "ami-2757f631" | |
instance_type = "t2.micro" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:latest | |
RUN mkdir /app | |
ADD ./pkg /app/ | |
WORKDIR /app | |
RUN go get "github.com/gorilla/mux" | |
RUN go build -o main . | |
CMD ["/app/main"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"github.com/gorilla/mux" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_autoscaling_group" "example" { | |
launch_configuration = "${aws_launch_configuration.example.id}" | |
load_balancers = ["${aws_elb.example.name}"] | |
availability_zones = ["eu-west-1b", "eu-west-1a"] | |
min_size = 2 | |
max_size = 5 | |
tag { | |
key = "Name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
region = "eu-west-1" | |
} | |
data "aws_availability_zones" "available" {} | |
resource "aws_security_group" "instance" { | |
name = "go-api-instance" | |
ingress { |
NewerOlder