Skip to content

winston/attache-lambda

Repository files navigation

make

will run tests, and if it passes, compile the code to generate a build/upload-lambda executable

NOTE: to cross compile for other architecture, setup the correct env

make clean
GOOS=linux GOARCH=amd64 make

Usage

package main

import (
	"log"
	"net/http"
	"os"

	attache "github.com/winston/attache-lambda"
	"github.com/winston/attache-lambda/s3store"
)

func main() {
	http.Handle("/", attache.Server{
		Storage: s3store.Store{
			Bucket: os.Getenv("AWS_BUCKET"),
		},
	})

	log.Printf("Listening to %s...", os.Getenv("PORT"))
	err := http.ListenAndServe(":"+os.Getenv("PORT"), nil)
	if err != nil {
		log.Fatalf(err.Error())
	}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •