diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/RestService.hs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/RestService.hs b/src/RestService.hs index 983deda..1236c44 100755 --- a/src/RestService.hs +++ b/src/RestService.hs @@ -33,15 +33,6 @@ addHeaders = ) ) -staticFilePaths :: [FilePath] -staticFilePaths = map ("./static/" ++) ["materialize.min.css", "materialize.min.js", "service.js"] - -staticFiles :: ScottyM () -staticFiles = do - mapM_ addFile staticFilePaths - where - addFile path = get (capture $ tail path) $ file path - data ExprReq = ExprReq {expression :: L.Text, result :: Maybe L.Text} deriving (Show, Generic) @@ -71,7 +62,7 @@ insertRow s n row = atomically $ do routes :: State -> ScottyM () routes state = do S.middleware addHeaders - staticFiles + get "/" $ file "./elm-client/index.html" get "/t/dummy" $ S.json $ evalTableExpressions (TableExpressions dummyTable ["sum(2,3,5)", "any(0,0,1)", "sum(age, -10)", "any(0,1)"]) get "/t/:id" $ |