Created
March 9, 2015 15:36
-
-
Save kennyp/3b286a4b880f7e58a419 to your computer and use it in GitHub Desktop.
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
defmodule TestApp.PageController do | |
use Phoenix.Controller | |
plug :action | |
def test(conn, _params) do | |
conn |> text "OK" | |
end | |
end |
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" | |
"net/http" | |
) | |
func main() { | |
http.HandleFunc("/test", func(w http.ResponseWriter, r *http.Request) { | |
fmt.Fprintf(w, "OK") | |
}) | |
http.ListenAndServe(":8080", nil) | |
} |
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
{-# LANGUAGE OverloadedStrings #-} | |
import Web.Scotty | |
main = scotty 3000 $ do | |
get "/test" $ do | |
html "OK" |
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
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