Skip to content
/ gluo Public
forked from darccio/gluo

Write your Go net/http server once, deploy it everywhere (on-premise & AWS Lambda supported)

License

Notifications You must be signed in to change notification settings

instoll/gluo

 
 

Gluo

Write your HTTP application in Go once, deploy it* to your servers and AWS Lambda. Really, it's a drop-in replacement for net/http.

*: it must be compiled as GOOS=linux to be deployed in AWS Lambda.

Status

Alpha quality. It needs to be tested out extensively but it seems to work fine.

GoDoc GoCard Coverage Status

Installation

go get github.com/imdario/gluo

import (
    "github.com/imdario/gluo"
)

Usage

Just call gluo.ListenAndServe instead of http.ListenAndServe.

package main

import (
        "github.com/imdario/gluo"
        "net/http"
)

func handler(w http.ResponseWriter, r *http.Request) {
        w.Write([]byte("Hello from Gluo"))
}

func main() {
        gluo.ListenAndServe(":3000", http.HandlerFunc(handler))
}

Alternatives

Here are some similar projects, although they don't allow to deploy the same binary to servers and AWS Lambda.

Contact me

If I can help you, you have an idea or you are using Gluo in your projects, don't hesitate to drop me a line (or a pull request): @im_dario

About

Written by Dario Castañé.

License

BSD 3-Clause license.

Support on Beerpay

Hey dude! Help me out for a couple of 🍻!

Beerpay Beerpay

About

Write your Go net/http server once, deploy it everywhere (on-premise & AWS Lambda supported)

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%