diff options
Diffstat (limited to 'make_endpoint.sh')
| -rw-r--r-- | make_endpoint.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/make_endpoint.sh b/make_endpoint.sh new file mode 100644 index 0000000..15dbc17 --- /dev/null +++ b/make_endpoint.sh @@ -0,0 +1,14 @@ +touch ./src/Endpoints/$1Endpoint.hs +echo "{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeOperators #-} + +module Endpoints.$1Endpoint ($1API, handle$1) where + +import Servant +import Data.$1Data + +type $1API = \"\" :> ... '[JSON] $1 + +handle$1 :: Handler $1 +handle$1 =" > ./src/Endpoints/$1Endpoint.hs +echo "Created $1Endpoint.hs" |