~fnux/baileys

7e5cc7cd0a66cd05326b2d62b21af329d35f7764 — Timothée Floure 6 months ago master
Initial project structure
6 files changed, 46 insertions(+), 0 deletions(-)

A .gitignore
A Makefile
A README.mkd
A app/Main.hs
A src/Baileys/API.hs
A src/Baileys/Handler.hs
A  => .gitignore +3 -0
@@ 1,3 @@
*.o
*.hi
baileys

A  => Makefile +12 -0
@@ 1,12 @@
OUTPUT=baileys

all: build

build:
	ghc -dynamic -isrc --make app/Main.hs -o $(OUTPUT)

run:
	./$(OUTPUT)

clean:
	rm -f $(OUTPUT)

A  => README.mkd +3 -0
@@ 1,3 @@
# Baileys

Directory management webapp.

A  => app/Main.hs +5 -0
@@ 1,5 @@
import Baileys.Handler
import Network.Wai.Handler.Warp (run)

main :: IO ()
main = run 8081 app

A  => src/Baileys/API.hs +8 -0
@@ 1,8 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
module Baileys.API where

import Servant.API
import Data.Text

type BaileysAPI = Get '[PlainText] Text

A  => src/Baileys/Handler.hs +15 -0
@@ 1,15 @@
{-# LANGUAGE OverloadedStrings #-}

module Baileys.Handler where

import Baileys.API
import Servant

baileysAPI :: Proxy BaileysAPI
baileysAPI = Proxy

srv :: Server BaileysAPI
srv = return "hello"

app :: Application
app = serve baileysAPI srv