Skip to content

Instantly share code, notes, and snippets.

@kennyp
Created March 9, 2015 15:36
Show Gist options
  • Save kennyp/3b286a4b880f7e58a419 to your computer and use it in GitHub Desktop.
Save kennyp/3b286a4b880f7e58a419 to your computer and use it in GitHub Desktop.
defmodule TestApp.PageController do
use Phoenix.Controller
plug :action
def test(conn, _params) do
conn |> text "OK"
end
end
package main
import (
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/test", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "OK")
})
http.ListenAndServe(":8080", nil)
}
{-# LANGUAGE OverloadedStrings #-}
import Web.Scotty
main = scotty 3000 $ do
get "/test" $ do
html "OK"
require 'sinatra'
get '/test' do
'OK'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment