This file contains hidden or 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
# Build | |
FROM golang:1.11-alpine | |
RUN apk add git | |
ADD . $GOPATH/src/myproject | |
WORKDIR $GOPATH/src/myproject | |
RUN go get myproject | |
RUN go install myproject | |
# Run | |
FROM alpine:latest |
This file contains hidden or 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" | |
"time" | |
"github.com/jinzhu/gorm" | |
_ "github.com/jinzhu/gorm/dialects/sqlite" | |
"github.com/satori/go.uuid" |
This file contains hidden or 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
files: | |
"/etc/httpd/conf.d/cors.conf" : | |
mode: "000644" | |
owner: root | |
group: root | |
content: | | |
<Location "/"> | |
Header set Access-Control-Allow-Origin: "https://YOURURL.IO" | |
Header set Access-Control-Allow-Methods: "POST, GET, PUT, DELETE, OPTIONS" | |
Header add Access-Control-Allow-Headers: "Authorization, Content-Type, Accept" |